author | William Roberts <williamr@symbian.org> |
Fri, 11 Jun 2010 15:19:16 +0100 | |
branch | HighFidelityModel |
changeset 297 | dc781d93a0ef |
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 version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
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: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
|
4 |
xmlns:date="http://exslt.org/dates-and-times" |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
5 |
exclude-result-prefixes="s exslt date"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
6 |
<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
|
7 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
8 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
9 |
<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
|
10 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
11 |
<xsl:template match="/SystemDefinition" mode="add-id-ns"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
12 |
<xsl:attribute name="id-namespace"><xsl:value-of select="$defaultns"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
13 |
</xsl:template> |
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 |
<!-- merging --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
16 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
17 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
18 |
<xsl:include href="mergesysdef-module.xsl"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
19 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
20 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
21 |
<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
|
22 |
<xsl:variable name="model" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
23 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
24 |
<xsl:variable name="sysdef"> <!-- all the merged sysdefs --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
25 |
<xsl:apply-templates select="." mode="first-merge"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
26 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
27 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
28 |
<!-- now create the output by putting all global attributes into <SystemDefinition> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
29 |
and any global meta sections into the systemModel or other root model item |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
30 |
this contains all the layout data needed to build the model --> |
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="exslt:node-set($sysdef)/*"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
32 |
<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
|
33 |
<xsl:apply-templates select="$model" mode="layout-attributes"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
34 |
<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
|
35 |
<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
|
36 |
<xsl:apply-templates select="$model/*[not(self::sysdef)]" mode="layout-meta"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
37 |
<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
|
38 |
</xsl:copy> |
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> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
40 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
41 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
42 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
43 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
44 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
45 |
<xsl:template match="/model" mode="first-merge"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
46 |
<xsl:apply-templates select="sysdef[1]" mode="join-sysdef-from-model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
47 |
</xsl:template> |
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:template match="/model[count(sysdef) > 1]" mode="first-merge"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
50 |
<xsl:variable name="prev"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
51 |
<xsl:apply-templates select="sysdef[1]" mode="join-sysdef-from-model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
52 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
53 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
54 |
<xsl:apply-templates select="sysdef[2]" mode="mergewith"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
55 |
<xsl:with-param name="upstream" select="exslt:node-set($prev)/*"/> |
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="up" select="current()/sysdef[1]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
57 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
58 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
59 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
60 |
<xsl:template match="sysdef" mode="mergewith"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
61 |
<xsl:param name="upstream"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
62 |
<xsl:param name="up"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
63 |
<xsl:variable name="downstream"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
64 |
<xsl:apply-templates select="." mode="join-sysdef-from-model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
65 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
66 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
67 |
<xsl:variable name="merged"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
68 |
<xsl:apply-templates mode="merge-models" select="$upstream"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
69 |
<xsl:with-param name="other" select="exslt:node-set($downstream)/*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
70 |
<xsl:with-param name="up" select="$up"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
71 |
<xsl:with-param name="down" select="current()"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
72 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
73 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
74 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
75 |
<xsl:when test="following-sibling::sysdef"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
76 |
<!-- more to come --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
77 |
<xsl:apply-templates select="following-sibling::sysdef[1]" mode="mergewith"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
78 |
<xsl:with-param name="upstream" select="exslt:node-set($merged)/*"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
79 |
<xsl:with-param name="up" select="$up"/> <!-- technically not needed since everything in upstram model is allready populated with root and name data, but needed for completeness --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
80 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
81 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
82 |
<xsl:otherwise><xsl:copy-of select="$merged"/></xsl:otherwise> <!-- we're done, just print--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
83 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
84 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
85 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
86 |
<!-- /merging --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
87 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
88 |
<xsl:template match="*" mode="layout-meta"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
89 |
<xsl:apply-templates select="*[not(self::sysdef)]" mode="global-meta"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
90 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
91 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
92 |
<xsl:template match="* | @*" mode="layout-attributes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
93 |
<xsl:apply-templates select="." mode="global-attributes"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
94 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
95 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
96 |
<xsl:template match="/model" mode="layout-attributes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
97 |
<xsl:apply-templates select="*[not(self::sysdef)] | @*" mode="layout-attributes"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
98 |
<xsl:if test="not(layout/@detail or @detail)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
99 |
<xsl:attribute name="detail">component</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
100 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
101 |
<!--<xsl:if test="not(layout/@placeholder-detail or @placeholder-detail )"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
102 |
<xsl:attribute name="placeholder-detail">component</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
103 |
</xsl:if>--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
104 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
105 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
106 |
<xsl:template match="layout" mode="layout-meta"> <!-- ensure it's grouped properly --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
107 |
<xsl:if test="info or ../@shapes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
108 |
<xsl:element name="meta"><xsl:attribute name="rel">styling</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:apply-templates select="../@shapes | info" mode="styling"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
110 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
111 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
112 |
<xsl:apply-templates select="*[not(self::sysdef)]" mode="layout-meta"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
113 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
114 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
115 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
116 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
117 |
<xsl:template match="/model[@revision-type='date']/@revision[contains(.,'%') and function-available('date:month-abbreviation')]" mode="layout-attributes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
118 |
<xsl:attribute name="revision"><xsl:call-template name="format-date"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
119 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
120 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
121 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
122 |
<xsl:template match="/model[@revision-type='date' and not(@revision) or @revision='%Y-%m-%d']/@revision-type" mode="layout-attributes" priority="4"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
123 |
<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
|
124 |
<xsl:if test="function-available('date:date-time')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
125 |
<xsl:attribute name="revision"><xsl:value-of select="substring-before(date:date-time(),'T')"/></xsl: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 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
128 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
129 |
<xsl:template mode="layout-attributes" match="layout"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
130 |
<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
|
131 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
132 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
133 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
134 |
<!-- new attribute: <values rank="list" default="..."> where list is a space-spearated list of system model item names. |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
135 |
If not present default applies to all items not referenced by an entry. If present, default only applies to unreferenced items of the specified type --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
136 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
137 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
138 |
<xsl:template match="/values" mode="overlay-meta"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
139 |
<xsl:param name="item"/><xsl:param name="ns"/><xsl:param name="id"/><xsl:param name="from"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
140 |
<xsl:if test="$from[@type='style' or @type='color' or @type='overlay'] "> <!-- at this point, only pattern, style and color can have multiple values --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
141 |
<xsl:variable name="join"><xsl:if test="$from/@type!=''">-</xsl:if></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
142 |
<xsl:variable name="value"> |
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 select="/values/item/*[@ref=$id or substring-after(@ref,':')=$id]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
144 |
<xsl:variable name="myns"><xsl:apply-templates select="@ref" mode="my-namespace"/></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
145 |
<xsl:if test="$myns = $ns"> <!-- actual match --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
146 |
<xsl:element name="generator{$join}{$from/@type}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
147 |
<xsl:attribute name="ref"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
148 |
<xsl:apply-templates select=".." mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
149 |
<xsl:with-param select="$from" name="base"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
150 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
151 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
152 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
153 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
154 |
</xsl: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:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
156 |
<xsl:if test="exslt:node-set($value)/* or (@default and (not(@rank) or contains(concat(' ',normalize-space(@rank),' '), concat(' ',local-name($item),' ')) ))"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
157 |
<xsl:element name="meta"><xsl:attribute name="rel">styling</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
158 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
159 |
<xsl:when test="exslt:node-set($value)/*"><xsl:copy-of select="$value"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
160 |
<xsl:when test="@default"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
161 |
<xsl:element name="generator{$join}{$from/@type}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
162 |
<xsl:attribute name="ref"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
163 |
<xsl:apply-templates select="$from" mode="style-id"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
164 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
165 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
166 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
167 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
168 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
169 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
170 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
171 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
172 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
173 |
<xsl:template match="/model/layout/display" mode="overlay-attributes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
174 |
<xsl:param name="item"/><xsl:param name="ns"/><xsl:param name="id"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
175 |
<xsl:variable name="myns"><xsl:apply-templates select="@ref" mode="my-namespace"/></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
176 |
<xsl:if test="@ref=$id or substring-after(@ref,':')=$id and $myns=$ns"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
177 |
<xsl:copy-of select="@*[name()!='ref']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
178 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
179 |
</xsl:template> |
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 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
182 |
<xsl:template match="/values" mode="overlay-attributes"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
183 |
<xsl:param name="item"/><xsl:param name="ns"/><xsl:param name="id"/><xsl:param name="from"/> |
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="$from[@type!='style' and @type!='color' and @type!='overlay']"> <!-- style, pattern and colour can have any number of values, so it needs to be captured in an element --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
185 |
<xsl:variable name="join"><xsl:if test="$from/@type!=''">-</xsl:if></xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
186 |
<xsl:for-each select="/values/item/*[@ref=$id or substring-after(@ref,':')=$id]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
187 |
<xsl:variable name="myns"><xsl:apply-templates select="@ref" mode="my-namespace"/></xsl:variable> |
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="$myns = $ns"> <!-- actual match --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
189 |
<xsl:attribute name="generator{$join}{$from/@type}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
190 |
<xsl:apply-templates select=".." mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
191 |
<xsl:with-param select="$from" name="base"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
192 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
193 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
194 |
</xsl:if> |
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 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
197 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
198 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
199 |
<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
|
200 |
<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
|
201 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
202 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
203 |
<xsl:template match="/values" mode="style-id"><xsl:param name="base"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
204 |
<xsl:apply-templates select="$base" mode="style-id"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
205 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
206 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
207 |
<xsl:template match="/values/item" mode="style-id"><xsl:param name="base"/> |
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 select="$base" 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
|
209 |
<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
|
210 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
211 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
212 |
<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
|
213 |
<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
|
214 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
215 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
216 |
<xsl:template match="colors|borders|patterns|styles" mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
217 |
<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
|
218 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
219 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
220 |
<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
|
221 |
<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
|
222 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
223 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
224 |
<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
|
225 |
<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
|
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 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
|
229 |
<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
|
230 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
231 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
232 |
<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
|
233 |
<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
|
234 |
<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
|
235 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
236 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
237 |
<xsl:template match="layout/layer-group" mode="layout-meta"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
238 |
<xsl:element name="meta"><xsl:attribute name="rel">layer-group</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
239 |
<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
|
240 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
241 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
242 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
243 |
<xsl:template match="layout/logo" mode="layout-meta"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
244 |
<xsl:element name="meta"><xsl:attribute name="rel">model-logo</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
245 |
<xsl:copy><xsl:copy-of select="@width | @height"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
246 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
247 |
<xsl:when test="@embed='yes' or @embed='true' "> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
248 |
<xsl:for-each select="document(@src,.)/s:svg"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
249 |
<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
|
250 |
<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
|
251 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
252 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
253 |
<xsl:otherwise><xsl:copy-of select="@src"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
254 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
255 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
256 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
257 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
258 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
259 |
<!-- legend follows --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
260 |
<xsl:template match="layout/legend" mode="layout-meta"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
261 |
<xsl:element name="meta"><xsl:attribute name="rel">model-legend</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
262 |
<xsl:copy><xsl:copy-of select="@*[name()!='literal']"/> |
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="not(@literal='yes' or @literal='true') and contains(@label,'{')"> |
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="label-ref"><xsl:apply-templates mode="style-id" select="."/></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 |
<xsl:apply-templates select="*" mode="layout-meta"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
267 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
268 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
269 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
270 |
<!-- put footer outside of the legend since technically it should be on the bottom of the diagram --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
271 |
<xsl:variable name="footer"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
272 |
<xsl:for-each select="/model/@copyright|/model/@distribution"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
273 |
<xsl:variable name="a" select="concat('@',name())"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
274 |
<!-- only use footer items if they are not referenced elsewhere in a label --> |
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(/model/layout//legend[contains(@label,$a)]) and not(/model/layout//legend/note[contains(.,$a)])"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
276 |
<xsl:value-of select="concat(' ',name(),' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
277 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
278 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
279 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
280 |
<xsl:if test="$footer!=''"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
281 |
<xsl:element name="meta"><xsl:attribute name="rel">model-footer</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
282 |
<xsl:for-each select="/model/@*[contains($footer,concat(' ',name(),' '))]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
283 |
<xsl:element name="{name()}"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
284 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
285 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
286 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
287 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
288 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
289 |
<xsl:template match="legend" mode="layout-meta"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
290 |
<xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
291 |
<xsl:copy-of select="@*[name()!='literal']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
292 |
<xsl:if test="not(@literal='yes' or @literal='true') and contains(@label,'{')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
293 |
<xsl:attribute name="label-ref"><xsl:apply-templates mode="style-id" select="."/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
294 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
295 |
<xsl:apply-templates select="*" mode="layout-meta"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
296 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
297 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
298 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
299 |
<xsl:template match="legend/note|legend/s:svg" mode="layout-meta"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
300 |
<xsl:copy><xsl:copy-of select="@*[name()!='literal']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
301 |
<xsl:if test="self::note and not(@literal='yes' or @literal='true') and contains(.,'{')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
302 |
<xsl:attribute name="label-ref"><xsl:apply-templates mode="style-id" select="."/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
303 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
304 |
<xsl:copy-of select="node()"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
305 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
306 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
307 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
308 |
<xsl:template match="legend[s:g]" mode="layout-meta"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
309 |
<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
|
310 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
311 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
312 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
313 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
314 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
315 |
<xsl:template match="@label" mode="legend-abbrev"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
316 |
<xsl:variable name="n" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
317 |
<xsl:variable name="match" select="$abbrevs[@name=$n]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
318 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
319 |
<xsl:when test="not($match)"><xsl:copy-of select="."/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
320 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
321 |
<xsl:attribute name="label"><xsl:value-of select="$match/@abbrev"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
322 |
<xsl:copy-of select="$match/@font"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
323 |
<xsl:if test="not($match/@font)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
324 |
<xsl:copy-of select="$match/ancestor::display-names/@font"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
325 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
326 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
327 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
328 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
329 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
330 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
331 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
332 |
<xsl:template match="legend" mode="legend-copy"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
333 |
<xsl:copy-of select="@*[name()!='use' or name()='literal']"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
334 |
<xsl:if test="not(@literal='yes' or @literal='true') and contains(@label,'{')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
335 |
<xsl:attribute name="label-ref"><xsl:apply-templates mode="style-id" select="."/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
336 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
337 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
338 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
339 |
<xsl:template match="legend[@use]" mode="layout-meta"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
340 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
341 |
<!-- $tag = bit after the # (can be empty) |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
342 |
$pre is bit before the # (can be empty) |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
343 |
$file is file pointed to by pre (can be empty) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
344 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
345 |
<xsl:variable name="tag" select="substring-after(@use,'#')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
346 |
<xsl:variable name="pre"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
347 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
348 |
<xsl:when test="$tag!=''"><xsl:value-of select="substring-before(@use,'#')"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
349 |
<xsl:otherwise><xsl:value-of select="@use"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
350 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
351 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
352 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
353 |
<xsl:variable name="file"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
354 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
355 |
<xsl:when test="starts-with($pre,'@')"><xsl:value-of select="//model/@*[name()=substring($pre,2)]"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
356 |
<xsl:otherwise><xsl:value-of select="$pre"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
357 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
358 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
359 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
360 |
<xsl:variable name="model" select="/model"/> <!-- hack for xsltproc --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
361 |
<xsl:variable name="legend" select="."/> <!-- hack for xsltproc --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
362 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
363 |
<xsl:variable name="this" select="."/> <!-- save node just in case need to use more than once --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
364 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
365 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
366 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
367 |
<xsl:when test="$tag!='' and $pre=''"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
368 |
<!-- pre is empty, but tag is not, so this legend is an info in this file --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
369 |
<xsl:for-each select="ancestor::layout/info[@type=$tag]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
370 |
<xsl:element name="legend"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
371 |
<xsl:apply-templates select="$this" mode="legend-copy"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
372 |
<xsl:apply-templates select="." mode="legend-layout"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
373 |
<xsl:with-param name="model" select="$model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
374 |
<xsl:with-param name="legend" select="$legend"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
375 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
376 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
377 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
378 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
379 |
<xsl:when test="$tag!=''"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
380 |
<xsl:for-each select="document($file,/)/*/*[name()=$tag]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
381 |
<xsl:element name="legend"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
382 |
<xsl:apply-templates select="$this" mode="legend-copy"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
383 |
<xsl:apply-templates select="." mode="legend-layout"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
384 |
<xsl:with-param name="model" select="$model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
385 |
<xsl:with-param name="legend" select="$legend"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
386 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
387 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
388 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
389 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
390 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
391 |
<xsl:for-each select="document($file,/)/*"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
392 |
<xsl:element name="legend"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
393 |
<xsl:apply-templates select="$this" mode="legend-copy"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
394 |
<xsl:apply-templates select="." mode="legend-layout"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
395 |
<xsl:with-param name="model" select="$model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
396 |
<xsl:with-param name="legend" select="$legend"/> |
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> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
398 |
</xsl:element> |
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> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
400 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
401 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
402 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
403 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
404 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
405 |
<xsl:template match="info[(@type='color' or @type='overlay' or @type='style' or @type='border') and document(@href,.)/values]" mode="legend-layout"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
406 |
<xsl:attribute name="use"><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
|
407 |
<xsl:attribute name="type"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
408 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
409 |
<xsl:when test="@type='color'">cbox</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
410 |
<xsl:otherwise>cmp</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
411 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
412 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
413 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
414 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
415 |
<xsl:template match="text()" mode="legend-layout"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
416 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
417 |
<!-- Any ref with a type attribute that starts with a # indicates a literal ref, so just copy it --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
418 |
<xsl:template match="*[starts-with(@type,'#')]" mode="layout-ref" priority="1"><xsl:value-of select="@type"/></xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
419 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
420 |
<!-- Borders in legend --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
421 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
422 |
<xsl:template match="border" mode="layout-ref">#Border<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
423 |
<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
|
424 |
<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
|
425 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
426 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
427 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
428 |
<!-- Colours in legend --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
429 |
<xsl:template match="color[../@type='highlight' or ../@type='text-highlight']" mode="layout-ref"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
430 |
<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
|
431 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
432 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
433 |
<xsl:template match="/shapes/colors/color[not(@value|@label)]" mode="legend-layout" priority="3"/> <!-- use value if no label, but don't show if neither --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
434 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
435 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
436 |
<!-- can have any number of these, so put in a sub-legend --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
437 |
<xsl:template match="/shapes/examples" mode="legend-layout"><xsl:param name="model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
438 |
<xsl:param name="legend"/> <!-- label on legend overrides label in values document --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
439 |
<xsl:variable name="tag" select="name()"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
440 |
<xsl:variable name="content"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
441 |
<!-- don't show this label if there is a label defined in the Model XML doc *and* this is the first legend item of this type (e.g colors, styles, etc) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
442 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
443 |
<xsl:when test="@sort='yes'"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
444 |
<xsl:apply-templates mode="legend-layout"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
445 |
<xsl:sort select="@label"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
446 |
<xsl:with-param name="model" select="$model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
447 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
448 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
449 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
450 |
<xsl:apply-templates mode="legend-layout"><xsl:with-param name="model" select="$model"/></xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
451 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
452 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
453 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
454 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
455 |
<xsl:when test="count(//*[name()=$tag]) != 1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
456 |
<legend> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
457 |
<xsl:if test="not($legend) or not($legend/@label) or preceding-sibling::*[name()=$tag]"><xsl:apply-templates select="@label" mode="legend-abbrev"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
458 |
<xsl:copy-of select="$content"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
459 |
</legend> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
460 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
461 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
462 |
<xsl:copy-of select="@sort|@show-unused"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
463 |
<xsl:if test="not($legend) or not($legend/@label) or preceding-sibling::*[name()=$tag]"><xsl:apply-templates select="@label" mode="legend-abbrev"/></xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
464 |
<xsl:copy-of select="$content"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
465 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
466 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
467 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
468 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
469 |
<!-- can have any number of these, so put in a sub-legend --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
470 |
<xsl:template match="/shapes/styles|/shapes/colors|/shapes/patterns|/shapes/borders" mode="legend-layout"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
471 |
<xsl:variable name="tag" select="name()"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
472 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
473 |
<xsl:when test="count(//*[name()=$tag]) != 1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
474 |
<xsl:element name="legend"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
475 |
<xsl:copy-of select="@sort|@show-unused"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
476 |
<xsl:attribute name="use"><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
|
477 |
<xsl:attribute name="type">cmp</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
478 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
479 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
480 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
481 |
<xsl:copy-of select="@sort|@show-unused"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
482 |
<xsl:attribute name="use"><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
|
483 |
<xsl:attribute name="type">cmp</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
484 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
485 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
486 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
487 |
|
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 match="overlay" mode="layout-ref">#Pattern<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
490 |
<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
|
491 |
<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
|
492 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
493 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
494 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
495 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
496 |
<xsl:template match="/shapes/*/*[not(@label)]" mode="legend-layout"/> <!-- don't show legend items with no label --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
497 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
498 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
499 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
500 |
<xsl:template match="/shapes" mode="as-example"><xsl:param name="at"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
501 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
502 |
<xsl:when test="name($at)='border' or name($at)='overlay'"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
503 |
<xsl:attribute name="generator-{name($at)}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
504 |
<xsl:apply-templates select="//*[name()=name($at) and @label=$at]" mode="style-id"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
505 |
</xsl:attribute> |
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:when test="name($at)='style'"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
508 |
<xsl:attribute name="generator-{name($at)}"><xsl:apply-templates select="//style[@label=$at]" 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
|
509 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
510 |
<xsl:when test="name($at)='color-highlight'"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
511 |
<xsl:attribute name="generator-highlight"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
512 |
<xsl:apply-templates select="//colors[@type='highlight']/color[@label=$at]" mode="style-id"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
513 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
514 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
515 |
<xsl:when test="name($at)='color-text-highlight'"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
516 |
<xsl:attribute name="generator-text-highlight"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
517 |
<xsl:apply-templates select="//colors[@type='text-highlight']/color[@label=$at]" mode="style-id"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
518 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
519 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
520 |
<xsl:when test="name($at)='color'"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
521 |
<xsl:attribute name="generator-color"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
522 |
<xsl:apply-templates select="//colors[not(@type) or @type='background']/color[@label=$at]/@color" mode="style-id"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
523 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
524 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
525 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
526 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
527 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
528 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
529 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
530 |
<xsl:template match="@color" mode="generated-value"><xsl:param name="model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
531 |
<xsl:variable name="v" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
532 |
<xsl:variable name="m" select="//color[@label=$v]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
533 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
534 |
<xsl:when test="count($m)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
535 |
<xsl:attribute name="generator-color"><xsl:apply-templates select="$m" 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
|
536 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
537 |
<xsl:when test="$model//info[@type='color']"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
538 |
<xsl:attribute name="generator-color"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
539 |
<xsl:variable name="m0" select="$model//info[@type='color']/@href"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
540 |
<xsl:apply-templates select="document($m0/@href,$m0)//item[@label=$v]" mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
541 |
<xsl:with-param name="base" select="$m0"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
542 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
543 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
544 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
545 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
546 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
547 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
548 |
<xsl:template match="examples/cmp" mode="legend-layout"><xsl:param name="model"/><xsl:param name="shapes" select="/shapes"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
549 |
<cmp> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
550 |
<xsl:if test="not(@literal='yes' or @literal='true') and contains(.,'{')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
551 |
<xsl:attribute name="label-ref"><xsl:apply-templates mode="style-id" select="."/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
552 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
553 |
<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
|
554 |
<xsl:apply-templates select="$shapes" mode="as-example"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
555 |
<xsl:with-param name="at" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
556 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
557 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
558 |
<xsl:apply-templates mode="generated-value" select="@color"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
559 |
<xsl:with-param name="model" select="$model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
560 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
561 |
<xsl:copy-of select="text()"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
562 |
</cmp> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
563 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
564 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
565 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
566 |
<xsl:template match="/shapes/colors[not(*)]" mode="legend-layout"><xsl:param name="model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
567 |
<!-- special known type which can be generated --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
568 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
569 |
<xsl:when test="count(//colors) != 1 and @match='@ts' and $model"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
570 |
<legend> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
571 |
<xsl:attribute name="use"><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
|
572 |
<xsl:attribute name="sort">yes</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
573 |
<xsl:attribute name="type">cbox</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
574 |
</legend> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
575 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
576 |
<xsl:when test="@match='@ts' and $model"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
577 |
<xsl:attribute name="use"><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
|
578 |
<xsl:attribute name="sort">yes</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
579 |
<xsl:attribute name="type">cbox</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
580 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
581 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
582 |
<!-- <xsl:call-template name="Caller-Warning"><xsl:with-param name="text">no colour data</xsl:with-param></xsl:call-template> --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
583 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
584 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
585 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
586 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
587 |
<!-- styling stuff --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
588 |
<xsl:template match="node()" mode="styling"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
589 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
590 |
<xsl:template match="@shapes" mode="styling"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
591 |
<xsl:variable name="model" select=".."/> <!-- hack for xsltproc --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
592 |
<xsl:apply-templates select="document(.,.)/shapes/*" mode="styling"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
593 |
<xsl:with-param name="model" select="$model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
594 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
595 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
596 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
597 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
598 |
<xsl:template match="layout/info[@type='color' or @type='border' or @type='overlay' or @type='style']" mode="styling"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
599 |
<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
|
600 |
<xsl:variable name="base" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
601 |
<group style-id="{$id}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
602 |
<xsl:copy-of select="@type | @show-unused"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
603 |
<xsl:for-each select="document(@href,.)/values"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
604 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
605 |
<xsl:when test="contains(normalize-space(@rank),' ')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
606 |
<xsl:when test="@rank"><xsl:attribute name="detail"><xsl:value-of select="@rank"/></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
|
607 |
<xsl:otherwise><xsl:attribute name="detail">component</xsl:attribute></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
608 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
609 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
610 |
<xsl:for-each select="document(@href,.)/values"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
611 |
<xsl:copy-of select="@default"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
612 |
<xsl:apply-templates select="@label" mode="legend-abbrev"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
613 |
<xsl:for-each select="item"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
614 |
<xsl:variable name="el"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
615 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
616 |
<xsl:when test="$base/@type='color'">cbox</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
617 |
<xsl:otherwise>cmp</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
618 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
619 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
620 |
<xsl:element name="{$el}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
621 |
<xsl:attribute name="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
622 |
<xsl:apply-templates select="." mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
623 |
<xsl:with-param name="base" select="$base"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
624 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
625 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
626 |
<xsl:apply-templates select="@label" mode="legend-abbrev"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
627 |
<xsl:attribute name="value"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
628 |
<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="not(starts-with(@value,'#')) and $base/@type='border' ">#Border<xsl:value-of select="@value"/></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:when test="not(starts-with(@value,'#')) and $base/@type='overlay' ">#Pattern<xsl:value-of select="@value"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
631 |
<!-- highlight not allowed in values files, but put here anyway --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
632 |
<xsl:when test="contains($base/@type,'highlight')">#<xsl:value-of select="$base/@type"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
633 |
<xsl:apply-templates select="." mode="style-id"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
634 |
<xsl:with-param name="base" select="$base"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
635 |
</xsl:apply-templates></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
636 |
<xsl:otherwise><xsl:value-of select="@value"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
637 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
638 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
639 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
640 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
641 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
642 |
</group> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
643 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
644 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
645 |
<xsl:template name="lgd-group-detail"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
646 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
647 |
<xsl:when test="@detail"><xsl:copy-of select="@detail"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
648 |
<xsl:when test="self::borders or not(@match)"><xsl:attribute name="detail">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
|
649 |
<xsl:when test="@match='component' or @match='collection' or @match='package' or @match='layer'"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
650 |
<xsl:attribute name="detail"><xsl:value-of select="@match"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
651 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
652 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
653 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
654 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
655 |
<xsl:template match="/shapes/colors[@match='@ts' and not(*)]" mode="styling" priority="4"/> <!-- no longer supported --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
656 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
657 |
<xsl:template match="/shapes/borders|/shapes/patterns|/shapes/styles|/shapes/colors" mode="styling"><xsl:param name="model"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
658 |
<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
|
659 |
<group type="{name(*)}" style-id="{$id}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
660 |
<xsl:attribute name="type"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
661 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
662 |
<xsl:when test="self::colors and @type='background' ">color</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
663 |
<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
|
664 |
<xsl:otherwise><xsl:value-of select="name(*)"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
665 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
666 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
667 |
<xsl:call-template name="lgd-group-detail"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
668 |
<xsl:copy-of select="@default"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
669 |
<xsl:apply-templates select="@label" mode="legend-abbrev"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
670 |
<xsl:apply-templates mode="styling"><xsl:with-param name="id" select="$id"/></xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
671 |
</group> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
672 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
673 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
674 |
<xsl:template match="/shapes/colors/color|/shapes/borders/border|/shapes/patterns/overlay|/shapes/styles/style" mode="styling"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
675 |
<xsl:variable name="my-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
|
676 |
<xsl:variable name="el"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
677 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
678 |
<xsl:when test="self::color[../@type='highlight' or ../@type='text-highlight']">cmp</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
679 |
<xsl:when test="self::color">cbox</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
680 |
<xsl:otherwise>cmp</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
681 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
682 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
683 |
<xsl:element name="{$el}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
684 |
<xsl:attribute name="style-id"><xsl:value-of select="$my-id"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
685 |
<xsl:apply-templates select="@label" mode="legend-abbrev"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
686 |
<xsl:if test="contains(@label,'{') or @count"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
687 |
<xsl:attribute name="label-ref"><xsl:value-of select="$my-id"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
688 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
689 |
<xsl:if test="@value"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
690 |
<xsl:attribute name="lookup"><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
|
691 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
692 |
<xsl:attribute name="value"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
693 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
694 |
<xsl:when test="self::style"><xsl:value-of select="."/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
695 |
<xsl:when test="self::color[not(../@type) or ../@type='background']"><xsl:value-of select="@color"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
696 |
<xsl:otherwise><xsl:apply-templates select="." mode="layout-ref"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
697 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
698 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
699 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
700 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
701 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
702 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
703 |
<!-- consider making this just an optional call to template so it does nothing if it's not needed --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
704 |
<xsl:template mode="is-content-filtered" match="*" priority="5"><xsl:param name="content"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
705 |
<xsl:if test="function-available('exslt:node-set') and count(exslt:node-set($content)/*[not(self::meta)])!=count(*[not(self::meta)])"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
706 |
<xsl:attribute name="filtered">yes</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
707 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
708 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
709 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
710 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
711 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
712 |
<!-- internal routines follows --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
713 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
714 |
<!-- for date formatting: only use if the date functions are *fully* supported (ie not by xalan) |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
715 |
Uses unix date %-encoding, but only a few are supported (see comments) |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
716 |
--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
717 |
<xsl:template name="format-date"><xsl:param name="date" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
718 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
719 |
<xsl:when test="contains($date,'%')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
720 |
<xsl:value-of select="substring-before($date,'%')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
721 |
<xsl:variable name="rest" select="substring-after($date,'%')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
722 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
723 |
<xsl:when test="starts-with($rest,'%') or $rest=''">%</xsl:when> <!-- %% a literal % --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
724 |
<xsl:when test="starts-with($rest,'a')"><xsl:value-of select="date:day-abbreviation()"/></xsl:when> <!-- %a locale’s abbreviated weekday name (e.g., Sun) --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
725 |
<xsl:when test="starts-with($rest,'A')"><xsl:value-of select="date:day-name()"/></xsl:when> <!-- %A locale’s full weekday name (e.g., Sunday)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
726 |
<xsl:when test="starts-with($rest,'b') or starts-with($rest,'h')"><xsl:value-of select="date:month-abbreviation()"/></xsl:when><!-- %b locale’s abbreviated month name (e.g., Jan)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
727 |
<xsl:when test="starts-with($rest,'B')"><xsl:value-of select="date:month-name()"/></xsl:when><!-- %B locale’s full month name (e.g., January)--> |
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="starts-with($rest,'d')"><xsl:number format="01" value="date:day-in-month()"/></xsl:when><!--%d day of month (e.g, 01)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
729 |
<xsl:when test="starts-with($rest,'e')"><xsl:number format=" 1" value="date:day-in-month()"/></xsl:when><!--%d day of month (e.g, 01)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
730 |
<xsl:when test="starts-with($rest,'F')"><xsl:value-of select="date:date()"/></xsl:when><!--%F full date; same as %Y-%m-%d--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
731 |
<xsl:when test="starts-with($rest,'H')"><xsl:number format="01" value="date:hour-in-day()"/></xsl:when><!--%H hour (00..23)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
732 |
<xsl:when test="starts-with($rest,'I')"><xsl:number format="01" value="((24 + date:hour-in-day() - 1) mod 12) + 1"/></xsl:when><!--%I hour (01..12)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
733 |
<xsl:when test="starts-with($rest,'j')"><xsl:number format="001" value="date:day-in-year()"/></xsl:when><!--%j day of year (001..366)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
734 |
<xsl:when test="starts-with($rest,'k')"><xsl:number format=" 1" value="date:hour-in-day()"/></xsl:when><!--%k hour ( 0..23)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
735 |
<xsl:when test="starts-with($rest,'l')"><xsl:number format=" 1" value="((24 + date:hour-in-day() - 1) mod 12) + 1"/></xsl:when><!--%l hour ( 1..12)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
736 |
<xsl:when test="starts-with($rest,'m')"><xsl:number format="01" value="date:month-in-year()"/></xsl:when><!--%m month (01..12)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
737 |
<xsl:when test="starts-with($rest,'M')"><xsl:number format="01" value="date:minute-in-hour()"/></xsl:when><!--%M minute (00..59)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
738 |
<xsl:when test="starts-with($rest,'p') and date:hour-in-day() < 12">AM</xsl:when><!--%p locale’s equivalent of either AM or PM; blank if not known--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
739 |
<xsl:when test="starts-with($rest,'p')">PM</xsl:when><!--%p locale’s equivalent of either AM or PM; blank if not known--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
740 |
<xsl:when test="starts-with($rest,'P') and date:hour-in-day() < 12">am</xsl:when><!--%P like %p, but lower case--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
741 |
<xsl:when test="starts-with($rest,'P')">pm</xsl:when><!--%P like %p, but lower case--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
742 |
<xsl:when test="starts-with($rest,'S')"><xsl:number format="01" value="date:second-in-minute()"/></xsl:when><!--%S second (00..60)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
743 |
<xsl:when test="starts-with($rest,'T')"><xsl:value-of select="date:time()"/></xsl:when><!--%T time; same as %H:%M:%S--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
744 |
<xsl:when test="starts-with($rest,'u')"><xsl:value-of select="((date:day-in-week() +5) mod 7) + 1"/></xsl:when><!--%u day of week (1..7); 1 is Monday--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
745 |
<xsl:when test="starts-with($rest,'V')"><xsl:value-of select="date:week-in-year()"/></xsl:when><!--%V ISO week number, with Monday as first day of week (01..53)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
746 |
<xsl:when test="starts-with($rest,'w')"><xsl:value-of select="date:day-in-week() - 1"/></xsl:when><!--%w day of week (0..6); 0 is Sunday--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
747 |
<xsl:when test="starts-with($rest,'y')"><xsl:value-of select="date:year() mod 100"/></xsl:when><!--%y last two digits of year (00..99)--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
748 |
<xsl:when test="starts-with($rest,'Y')"><xsl:value-of select="date:year()"/></xsl:when><!--%Y year--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
749 |
<xsl:otherwise><xsl:value-of select="substring($rest,1,1)"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
750 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
751 |
<xsl:if test="string-length($rest) > 1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
752 |
<xsl:call-template name="format-date"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
753 |
<xsl:with-param name="date" select="substring($rest,2)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
754 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
755 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
756 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
757 |
<xsl:otherwise><xsl:value-of select="$date"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
758 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
759 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
760 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
761 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
762 |
</xsl:stylesheet> |