author | Simon Howkins <simonh@symbian.org> |
Thu, 18 Nov 2010 14:21:58 +0000 | |
branch | HighFidelityModel |
changeset 499 | 37468c63b544 |
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 |
<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
|
2 |
xmlns:s="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:exslt="http://exslt.org/common" |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
3 |
exclude-result-prefixes="s exslt" > |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
4 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
5 |
<xsl:variable name="css"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
6 |
<css><xsl:copy-of select="/*/@xml:lang"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
7 |
<xsl:apply-templates select="//style | //s:style" mode="css"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
8 |
</css> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
9 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
10 |
<!-- debugging <xsl:template match="/*"><xsl:copy-of select="$css"/></xsl:template>--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
11 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
12 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
13 |
<xsl:template match="s:style" mode="unstyle"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
14 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
15 |
<xsl:template match="*" mode="unstyle"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
16 |
<xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
17 |
<xsl:apply-templates select="@*" mode="unstyle"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
18 |
<xsl:call-template name="style"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
19 |
<xsl:apply-templates select="node()" mode="unstyle"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
20 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
21 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
22 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
23 |
<xsl:template match="@*|text()" mode="unstyle"><xsl:copy-of select="."/></xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
24 |
<xsl:template match="@style" mode="unstyle"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
25 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
26 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
27 |
<xsl:template match="*" mode="style-value"><xsl:param name="property"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
28 |
<xsl:variable name="this"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
29 |
<xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
30 |
<xsl:apply-templates select="@*" mode="unstyle"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
31 |
<xsl:call-template name="style"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
32 |
</xsl:copy> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
33 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
34 |
<xsl:value-of select="exslt:node-set($this)/*/@*[name()=$property]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
35 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
36 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
37 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
38 |
<xsl:template name="style"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
39 |
<xsl:variable name="cur" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
40 |
<xsl:variable name="styles"> |
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 select="exslt:node-set($css)/css//item[ |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
42 |
( contains(concat(' ',normalize-space($cur/@class),' '),concat(' ',@class,' ')) or not(@class) ) and |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
43 |
( @id = $cur/@id or not(@id) ) and |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
44 |
( not(starts-with(@psuedo,'lang(')) or lang(substring-before(substring-after(@psuedo,'lang(')),')')) and |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
45 |
( @tag = local-name($cur) or not(@tag) ) and not(ancestor::media)]"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
46 |
<xsl:variable name="found"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
47 |
<xsl:if test="parent::parent"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
48 |
<xsl:apply-templates select="parent::parent" mode="match"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
49 |
<xsl:with-param name="svg" select="$cur"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
50 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
51 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
52 |
<xsl:if test="not(parent::parent)">1</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
53 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
54 |
<xsl:if test="$found!=''"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
55 |
<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
|
56 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
57 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
58 |
<xsl:apply-templates select="@style" mode="css"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
59 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
60 |
<!-- debug <xsl:copy-of select="$styles"/>--> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
61 |
<xsl:for-each select="exslt:node-set($styles)/*"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
62 |
<xsl:if test="not(preceding-sibling::*[name()=name(current()) and @bang='important']) and not($cur/@*[name()=name(current())])"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
63 |
<xsl:attribute name="{name()}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
64 |
<xsl:value-of select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
65 |
</xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
66 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
67 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
68 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
69 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
70 |
<xsl:template match="parent" mode="match"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
71 |
<xsl:param name="svg"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
72 |
<xsl:variable name="this" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
73 |
<xsl:variable name="match" select="$svg/ancestor::*[ |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
74 |
( contains(concat(' ',normalize-space(@class),' '),concat(' ',$this/@class,' ')) or not($this/@class) ) and |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
75 |
( $this/@id = @id or not($this/@id) ) and |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
76 |
( not(starts-with($this/@psuedo,'lang(')) or lang(substring-before(substring-after($this/@psuedo,'lang(')),')')) and |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
77 |
( $this/@tag = local-name() or not($this/@tag) )]"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
78 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
79 |
<xsl:when test="$match and parent::parent"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
80 |
<xsl:for-each select="$match"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
81 |
<xsl:apply-templates select="parent::parent" mode="match"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
82 |
<xsl:with-param name="svg" select="current()"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
83 |
</xsl:apply-templates> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
84 |
</xsl:for-each> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
85 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
86 |
<xsl:when test="$match">1</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
87 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
88 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
89 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
90 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
91 |
<xsl:template match="*" mode="css"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
92 |
<xsl:call-template name="cssitem"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
93 |
<xsl:with-param name="text"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
94 |
<xsl:call-template name="nocomments"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
95 |
</xsl:with-param> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
96 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
97 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
98 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
99 |
<xsl:template match="@style" mode="css"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
100 |
<xsl:call-template name="parse-properties"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
101 |
<xsl:with-param select="." name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
102 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
103 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
104 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
105 |
<xsl:template name="cssitem"><xsl:param name="text" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
106 |
<xsl:variable name="pre" select="normalize-space(substring-before($text,'{'))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
107 |
<xsl:variable name="post" select="substring-after($text,'{')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
108 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
109 |
<xsl:when test="contains($pre,'@')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
110 |
<xsl:variable name="cnt"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
111 |
<xsl:call-template name="endgroup"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
112 |
<xsl:with-param name="text" select="$post"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
113 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
114 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
115 |
<xsl:element name="{substring-before(substring-after($pre,'@'),' ')}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
116 |
<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
|
117 |
<xsl:value-of select="normalize-space(substring-after(substring-after($pre,'@'),' '))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
118 |
</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:call-template name="cssitem"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
120 |
<xsl:with-param name="text" select="$cnt"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
121 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
122 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
123 |
<xsl:call-template name="cssitem"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
124 |
<xsl:with-param name="text" select="substring($post,string-length($cnt) + 2)"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
125 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
126 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
127 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
128 |
<xsl:call-template name="parse-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
129 |
<xsl:with-param name="list" select="$pre"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
130 |
<xsl:with-param name="value-text" select="substring-before($post,'}')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
131 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
132 |
<xsl:variable name="next" select="substring-after($post,'}')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
133 |
<xsl:if test="normalize-space($next)!=''"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
134 |
<xsl:call-template name="cssitem"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
135 |
<xsl:with-param name="text" select="$next"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
136 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
137 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
138 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
139 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
140 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
141 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
142 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
143 |
<xsl:template name="endgroup"><xsl:param name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
144 |
<xsl:variable name="open" select="substring-before($text,'{')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
145 |
<xsl:variable name="close" select="substring-before($text,'}')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
146 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
147 |
<xsl:when test="contains($text,'{') and string-length($open) < string-length($close)"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
148 |
<xsl:value-of select="concat($close,'}')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
149 |
<xsl:call-template name="endgroup"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
150 |
<xsl:with-param name="text" select="substring-after($text,'}')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
151 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
152 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
153 |
<xsl:when test="contains($text,'}')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
154 |
<xsl:value-of select="$close"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
155 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
156 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
157 |
<xsl:value-of select="$text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
158 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
159 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
160 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
161 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
162 |
<xsl:template name="nocomments"><xsl:param name="text" select="."/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
163 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
164 |
<xsl:when test="contains($text,'/*')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
165 |
<xsl:value-of select="substring-before($text,'/*')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
166 |
<xsl:call-template name="nocomments"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
167 |
<xsl:with-param select="substring-after(substring-after($text,'/*'),'*/')" name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
168 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
169 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
170 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
171 |
<xsl:value-of select="$text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
172 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
173 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
174 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
175 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
176 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
177 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
178 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
179 |
<xsl:template name="parse-list"><xsl:param name="value-text"/><xsl:param name="list"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
180 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
181 |
<xsl:when test="contains($list,',')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
182 |
<xsl:call-template name="parse-item"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
183 |
<xsl:with-param select="normalize-space(substring-before($list,','))" name="item"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
184 |
<xsl:with-param select="$value-text" name="value-text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
185 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
186 |
<xsl:call-template name="parse-list"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
187 |
<xsl:with-param select="substring-after($list,',')" name="list"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
188 |
<xsl:with-param select="$value-text" name="value-text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
189 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
190 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
191 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
192 |
<xsl:call-template name="parse-item"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
193 |
<xsl:with-param select="normalize-space($list)" name="item"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
194 |
<xsl:with-param select="$value-text" name="value-text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
195 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
196 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
197 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
198 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
199 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
200 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
201 |
<xsl:template name="parse-item"><xsl:param name="value-text"/><xsl:param name="item"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
202 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
203 |
<xsl:when test="contains($item,' ')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
204 |
<xsl:call-template name="parse-term"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
205 |
<xsl:with-param select="substring-before($item,' ')" name="item"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
206 |
<xsl:with-param select="$value-text" name="value-text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
207 |
<xsl:with-param select="substring-after($item,' ')" name="descend"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
208 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
209 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
210 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
211 |
<xsl:call-template name="parse-term"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
212 |
<xsl:with-param select="$item" name="item"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
213 |
<xsl:with-param select="$value-text" name="value-text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
214 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
215 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
216 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
217 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
218 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
219 |
<xsl:template name="parse-term"><xsl:param name="value-text"/><xsl:param name="item"/><xsl:param name="descend"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
220 |
<xsl:variable name="type"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
221 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
222 |
<xsl:when test="$descend=''">item</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
223 |
<xsl:otherwise>parent</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
224 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
225 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
226 |
<xsl:element name="{$type}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
227 |
<xsl:variable name="v0"> <!-- check for pseudo class --> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
228 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
229 |
<xsl:when test="contains($item,':')"><xsl:value-of select="substring-before($item,':')"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
230 |
<xsl:otherwise><xsl:value-of select="$item"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
231 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
232 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
233 |
<xsl:if test="$v0!=$item"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
234 |
<xsl:attribute name="pseudo"><xsl:value-of select="substring-after($item,':')"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
235 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
236 |
<xsl:if test="$v0 != '' "> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
237 |
<xsl:variable name="v1"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
238 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
239 |
<xsl:when test="contains($v0,'.')"><xsl:value-of select="substring-before($v0,'.')"/></xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
240 |
<xsl:otherwise><xsl:value-of select="$v0"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
241 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
242 |
</xsl:variable> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
243 |
<xsl:if test="$v1!=$v0"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
244 |
<xsl:attribute name="class"><xsl:value-of select="substring-after($v0,'.')"/></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:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
246 |
<xsl:if test="$v1 != '' "> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
247 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
248 |
<xsl:when test="starts-with($v1,'#')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
249 |
<xsl:attribute name="id"><xsl:value-of select="substring($v1,2)"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
250 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
251 |
<xsl:otherwise><xsl:attribute name="tag"><xsl:value-of select="$v1"/></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
|
252 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
253 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
254 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
255 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
256 |
<xsl:when test="$descend!=''"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
257 |
<xsl:call-template name="parse-item"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
258 |
<xsl:with-param select="$descend" name="item"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
259 |
<xsl:with-param select="$value-text" name="value-text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
260 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
261 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
262 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
263 |
<xsl:call-template name="parse-properties"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
264 |
<xsl:with-param select="$value-text" name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
265 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
266 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
267 |
</xsl:choose> |
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 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
270 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
271 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
272 |
<xsl:template name="parse-properties"><xsl:param name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
273 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
274 |
<xsl:when test="contains($text,';')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
275 |
<xsl:call-template name="parse-property"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
276 |
<xsl:with-param select="substring-before($text,';')" name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
277 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
278 |
<xsl:if test="normalize-space(substring-after($text,';'))!=''"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
279 |
<xsl:call-template name="parse-properties"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
280 |
<xsl:with-param select="substring-after($text,';')" name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
281 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
282 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
283 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
284 |
<xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
285 |
<xsl:call-template name="parse-property"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
286 |
<xsl:with-param select="$text" name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
287 |
</xsl:call-template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
288 |
</xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
289 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
290 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
291 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
292 |
<xsl:template name="parse-property"><xsl:param name="text"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
293 |
<xsl:if test="contains($text,':')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
294 |
<xsl:variable name="post" select="substring-after($text,':')"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
295 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
296 |
<xsl:element name="{normalize-space(substring-before($text,':'))}"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
297 |
<xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
298 |
<xsl:when test="contains($post,'!')"> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
299 |
<xsl:attribute name="bang"><xsl:value-of select="substring-after($post,'!')"/></xsl:attribute> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
300 |
<xsl:value-of select="normalize-space(substring-before($post,'!'))"/> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
301 |
</xsl:when> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
302 |
<xsl:otherwise><xsl:value-of select="normalize-space($post)"/></xsl:otherwise> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
303 |
</xsl:choose> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
304 |
</xsl:element> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
305 |
</xsl:if> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
306 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
307 |
</xsl:template> |
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
308 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
309 |
|
5acf50bbb618
Preview version of system model generator which supports 3.0 syntax
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
310 |
</xsl:stylesheet> |