annotate xslt/generator.csharp.xsl @ 7:3fe157be5141

sync
author cin
date Tue, 06 Mar 2018 19:27:25 +0300
parents 1f4009d4afb6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
2 <xsl:stylesheet version="1.0"
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://implab.org/schemas/data-model.v1.xsd"
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
4 xmlns:clr="http://implab.org/schemas/data-model/dotnet.v1.xsd"
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
5 xmlns:cs="http://implab.org/schemas/code-dom/csharp.v1.xsd" xmlns:sql="http://implab.org/schemas/data-model/sql.v1.xsd"
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
6 xmlns:t="http://implab.org/schemas/temp" xmlns:exsl="http://exslt.org/common"
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
7 exclude-result-prefixes="clr m xsl exsl sql">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
8 <xsl:import href="model.xsl"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
9
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
10 <xsl:output method="xml" indent="yes" />
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
11
3
437127ab6a12 non-working version
cin
parents: 2
diff changeset
12 <!-- generate code for primary package -->
437127ab6a12 non-working version
cin
parents: 2
diff changeset
13 <xsl:template match="m:package[@primary='true' and @clr:namespace]" mode="document">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
14 <cs:namespace name="{@clr:namespace}">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
15 <xsl:apply-templates mode="document" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
16 </cs:namespace>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
17 </xsl:template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
18
437127ab6a12 non-working version
cin
parents: 2
diff changeset
19 <xsl:template match="m:package[@primary='true']" mode="document">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
20 <xsl:apply-templates mode="document" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
21 </xsl:template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
22
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
23 <!-- entity -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
24 <xsl:template match="m:entity" mode="document">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
25 <xsl:apply-templates select="." mode="entity"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
26 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
27
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
28 <xsl:template match="m:entity" mode="entity">
5
cin
parents: 4
diff changeset
29 <!-- select all members -->
4
cin
parents: 3
diff changeset
30 <xsl:variable name="members">
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
31 <xsl:apply-templates mode="filter-members"/>
4
cin
parents: 3
diff changeset
32 </xsl:variable>
5
cin
parents: 4
diff changeset
33
3
437127ab6a12 non-working version
cin
parents: 2
diff changeset
34 <cs:class modifiers="partial">
5
cin
parents: 4
diff changeset
35 <!-- generate class name -->
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
36 <xsl:attribute name="name">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
37 <xsl:apply-templates select="." mode="class-name"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
38 </xsl:attribute>
5
cin
parents: 4
diff changeset
39 <xsl:attribute name="modifiers">
cin
parents: 4
diff changeset
40 <xsl:apply-templates select="." mode="class-modifiers"/>
cin
parents: 4
diff changeset
41 </xsl:attribute>
cin
parents: 4
diff changeset
42
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
43 <xsl:apply-templates mode="class-attributes" />
4
cin
parents: 3
diff changeset
44 <xsl:apply-templates select="exsl:node-set($members)" mode="members" />
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
45 </cs:class>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
46 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
47
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
48 <!-- class-name -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
49 <xsl:template match="*[@name]" mode="class-name">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
50 <xsl:value-of select="@name"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
51 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
52
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
53 <xsl:template match="*[@clr:name]" mode="class-name">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
54 <xsl:value-of select="@clr:name"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
55 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
56
5
cin
parents: 4
diff changeset
57 <!-- class-modifiers -->
cin
parents: 4
diff changeset
58 <xsl:template match="*" mode="class-modifiers">
cin
parents: 4
diff changeset
59 <xsl:text>partial</xsl:text>
cin
parents: 4
diff changeset
60 </xsl:template>
cin
parents: 4
diff changeset
61
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
62 <!-- class-attributes -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
63 <xsl:template match="*|text()" mode="class-attributes" />
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
64
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
65 <xsl:template match="sql:table" mode="class-attributes">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
66 <cs:attribute>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
67 <cs:type name="Table" namespace="Linq2Db" />
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
68 <cs:parameter><cs:string text="{@name}"/></cs:parameter>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
69 </cs:attribute>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
70 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
71
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
72 <!-- generate members -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
73
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
74 <xsl:template match="*|text()" mode="members" />
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
75
7
cin
parents: 6
diff changeset
76 <xsl:template match="m:primaryKey | m:property" mode="members">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
77 <t:trace msg="{name()} {@name}"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
78 <xsl:apply-templates select="." mode="property"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
79 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
80
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
81 <!-- member-name -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
82 <xsl:template match="*|text()|@*" mode="member-name" />
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
83
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
84 <xsl:template match="*[@name]" mode="member-name">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
85 <xsl:value-of select="@name"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
86 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
87 <xsl:template match="*[@clr:name]" mode="member-name">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
88 <xsl:value-of select="@clr:name"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
89 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
90
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
91 <!-- member-type -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
92 <xsl:template match="*|text()|@*" mode="member-type" />
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
93
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
94 <xsl:template match="*[@type]" mode="member-type">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
95 <xsl:call-template name="getClrType">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
96 <xsl:with-param name="type" select="@type" />
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
97 </xsl:call-template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
98 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
99
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
100 <xsl:template match="*[clr:type]" mode="member-type">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
101 <xsl:apply-templates select="clr:type" mode="clr-type" />
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
102 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
103
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
104 <!-- member-attributes -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
105 <xsl:template match="*|text()" mode="member-attributes"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
106
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
107 <!-- member-extension -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
108 <xsl:template match="*|text()" mode="member-extension"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
109 <xsl:template match="*" mode="member-extension">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
110 <xsl:apply-templates mode="member-extension-comments"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
111 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
112
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
113 <xsl:template match="m:hasA/* | m:hasMany/*" mode="member-extension">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
114 <xsl:variable name="comments" select="../m:description | m:description"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
115 <xsl:apply-templates select="$comments[position() = count($comments)]" mode="member-extension-comments"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
116 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
117
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
118 <!-- member-extension-comments -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
119 <xsl:template match="*|text()" mode="member-extension-comments"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
120
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
121 <xsl:template match="m:description" mode="member-extension-comments">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
122 <cs:comments>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
123 <xsl:apply-templates mode="comments" />
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
124 </cs:comments>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
125 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
126
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
127 <!-- property -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
128
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
129 <xsl:template match="*" mode="property">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
130 <cs:property modifiers="public">
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
131 <xsl:attribute name="name"><xsl:apply-templates select="." mode="member-name"/></xsl:attribute>
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
132 <xsl:attribute name="modifiers"><xsl:apply-templates select="." mode="member-modifiers"/></xsl:attribute>
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
133 <xsl:apply-templates select="." mode="member-type"/>
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
134 <xsl:apply-templates select="." mode="member-attributes"/>
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
135 <xsl:apply-templates select="." mode="member-extension" />
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
136 <xsl:apply-templates select="." mode="property-accessors"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
137 </cs:property>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
138 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
139
5
cin
parents: 4
diff changeset
140
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
141 <!-- member-name -->
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
142 <xsl:template match="m:hasA/clr:association[not(@name|@clr:name)]" mode="member-name">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
143 <!-- if the association doesn't define a name, use it from the parent node -->
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
144 <xsl:apply-templates select=".." mode="member-name"/>
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
145 </xsl:template>
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
146 <xsl:template match="m:hasMany/clr:association[not(@name|@clr:name)]" mode="member-name">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
147 <!-- if the association doesn't define a name, use it from the parent node -->
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
148 <xsl:apply-templates select=".." mode="member-name"/>
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
149 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
150
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
151 <!-- member-modifiers -->
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
152 <xsl:template match="*" mode="member-modifiers">
3
437127ab6a12 non-working version
cin
parents: 2
diff changeset
153 <xsl:text>public</xsl:text>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
154 </xsl:template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
155
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
156 <!-- member-type -->
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
157 <xsl:template match="m:hasA[@type]/clr:association[not(clr:type)]" mode="member-type">
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
158 <xsl:apply-templates select=".." mode="member-type"/>
5
cin
parents: 4
diff changeset
159 </xsl:template>
cin
parents: 4
diff changeset
160
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
161 <xsl:template match="m:hasMany[@type]/clr:association[not(clr:type)]" mode="member-type">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
162 <cs:array>
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
163 <xsl:apply-templates select=".." mode="member-type"/>
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
164 </cs:array>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
165 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
166
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
167 <xsl:template match="m:hasA[@type]/m:thisKey" mode="member-type">
5
cin
parents: 4
diff changeset
168 <xsl:variable name="otherKey">
3
437127ab6a12 non-working version
cin
parents: 2
diff changeset
169 <xsl:call-template name="getPrimaryKey">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
170 <xsl:with-param name="type" select="../@type"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
171 </xsl:call-template>
5
cin
parents: 4
diff changeset
172 </xsl:variable>
cin
parents: 4
diff changeset
173 <xsl:choose>
cin
parents: 4
diff changeset
174 <xsl:when test="@optional">
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
175 <cs:nullable>
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
176 <xsl:apply-templates select="exsl:node-set($otherKey)" mode="member-type"/>
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
177 </cs:nullable>
5
cin
parents: 4
diff changeset
178 </xsl:when>
cin
parents: 4
diff changeset
179 <xsl:otherwise>
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
180 <xsl:apply-templates select="exsl:node-set($otherKey)" mode="member-type"/>
5
cin
parents: 4
diff changeset
181 </xsl:otherwise>
cin
parents: 4
diff changeset
182 </xsl:choose>
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
183 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
184
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
185 <!-- member-attributes -->
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
186 <xsl:template match="m:primaryKey" mode="member-attributes">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
187 <cs:attribute>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
188 <cs:type name="PrimaryKey" namespace="Linq2Db" />
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
189 </cs:attribute>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
190 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
191
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
192 <xsl:template match="m:hasA/clr:association" mode="member-attributes">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
193 <cs:attribute>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
194 <cs:type name="Association" namespace="Linq2Db"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
195 <cs:parameter name="thisKey">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
196 <cs:nameOf>
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
197 <xsl:call-template name="getClrMemberReference">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
198 <xsl:with-param name="memberName" select="../@name"/>
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
199 <xsl:with-param name="type" select="../@declaringType"/>
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
200 </xsl:call-template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
201 </cs:nameOf>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
202 </cs:parameter>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
203 <cs:parameter name="otherKey">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
204 <cs:nameOf>
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
205 <xsl:call-template name="getClrKeyReference">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
206 <xsl:with-param name="type" select="../@type"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
207 </xsl:call-template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
208 </cs:nameOf>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
209 </cs:parameter>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
210 </cs:attribute>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
211 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
212
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
213 <xsl:template match="m:hasMany/clr:association" mode="member-attributes">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
214 <cs:attribute>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
215 <cs:type name="Association" namespace="Linq2Db"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
216 <!-- thisKey points to own primaryKey which may be inherited, using getKeyName to address such cases -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
217 <cs:parameter name="thisKey">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
218 <cs:nameOf>
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
219 <xsl:call-template name="getClrKeyReference">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
220 <xsl:with-param name="type" select="../../@name"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
221 </xsl:call-template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
222 </cs:nameOf>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
223 </cs:parameter>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
224 <cs:parameter name="otherKey">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
225 <cs:nameOf>
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
226 <xsl:call-template name="getClrMemberReference">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
227 <xsl:with-param name="type" select="../@type"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
228 <xsl:with-param name="memberName" select="../m:otherKey/@name"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
229 </xsl:call-template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
230 </cs:nameOf>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
231 </cs:parameter>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
232 </cs:attribute>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
233 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
234
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
235 <!-- property-accessors -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
236 <xsl:template match="*" mode="property-accessors">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
237 <cs:get/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
238 <cs:set/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
239 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
240
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
241 <xsl:template match="m:hasA[clr:lazy]/m:thisKey" mode="property-accessors">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
242 <cs:get>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
243 <xsl:text>return </xsl:text>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
244 <xsl:apply-templates select="../clr:lazy" mode="field-name"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
245 <xsl:text>.Key;</xsl:text>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
246 </cs:get>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
247 <cs:set>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
248 <xsl:apply-templates select="../clr:lazy" mode="field-name"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
249 <xsl:text>.Key = value;</xsl:text>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
250 </cs:set>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
251 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
252
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
253 <xsl:template match="m:hasA[clr:lazy]/clr:association" mode="property-accessors">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
254 <cs:get>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
255 <xsl:text>return </xsl:text>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
256 <xsl:apply-templates select="../clr:lazy" mode="field-name"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
257 <xsl:text>.Instance;</xsl:text>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
258 </cs:get>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
259 <cs:set>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
260 <xsl:apply-templates select="../clr:lazy" mode="field-name"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
261 <xsl:text>.Instance = value;</xsl:text>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
262 </cs:set>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
263 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
264
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
265 <!-- fields -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
266 <xsl:template match="*" mode="field">
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
267 <cs:field>
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
268 <xsl:attribute name="name"><xsl:apply-templates select="." mode="member-name"/></xsl:attribute>
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
269 <xsl:apply-templates select="." mode="member-type"/>
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
270 <xsl:apply-templates select="." mode="field-initializer"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
271 </cs:field>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
272 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
273
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
274 <!-- field-name -->
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
275 <xsl:template match="m:hasA/clr:lazy" mode="member-name">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
276 <xsl:text>m_lazy</xsl:text>
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
277 <xsl:apply-templates select=".." mode="member-name"/>
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
278 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
279
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
280 <xsl:template match="clr:lazy[@field]" mode="member-name">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
281 <xsl:value-of select="@field"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
282 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
283
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
284 <!-- member-type -->
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
285 <xsl:template match="m:hasA[@optional='true']/clr:lazy" mode="member-type">
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
286 <xsl:variable name="otherKey">
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
287 <xsl:call-template name="getPrimaryKey">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
288 <xsl:with-param name="type" select="../@type"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
289 </xsl:call-template>
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
290 </xsl:variable>
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
291 <cs:type name="NullableReference" namespace="Pallada.Data">
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
292 <xsl:apply-templates select="exsl:node-set($otherKey)" mode="member-type"/>
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
293 <xsl:apply-templates select=".." mode="member-type"/>
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
294 </cs:type>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
295 </xsl:template>
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
296 <xsl:template match="m:hasA[@optional!='true']/clr:lazy" mode="member-type">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
297 <cs:type name="Reference" namespace="Pallada.Data">
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
298 <xsl:apply-templates select="../m:thisKey" mode="member-type"/>
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
299 <xsl:apply-templates select=".." mode="member-type"/>
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
300 </cs:type>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
301 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
302
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
303 <!-- field-initializer -->
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
304 <xsl:template match="*|text()" mode="field-initializer"/>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
305
5
cin
parents: 4
diff changeset
306 <xsl:template name="getClrKeyReference">
cin
parents: 4
diff changeset
307 <xsl:param name="type"/>
cin
parents: 4
diff changeset
308 <xsl:variable name="primaryKey">
cin
parents: 4
diff changeset
309 <xsl:call-template name="getPrimaryKey">
cin
parents: 4
diff changeset
310 <xsl:with-param name="type" select="$type"/>
cin
parents: 4
diff changeset
311 </xsl:call-template>
cin
parents: 4
diff changeset
312 </xsl:variable>
cin
parents: 4
diff changeset
313
cin
parents: 4
diff changeset
314 <xsl:apply-templates select="exsl:node-set($primaryKey)" mode="clr-member-reference"/>
cin
parents: 4
diff changeset
315 </xsl:template>
cin
parents: 4
diff changeset
316
cin
parents: 4
diff changeset
317 <!-- -->
cin
parents: 4
diff changeset
318 <xsl:template name="getClrMemberReference">
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
319 <xsl:param name="type"/>
5
cin
parents: 4
diff changeset
320 <xsl:param name="memberName"/>
cin
parents: 4
diff changeset
321 <xsl:param name="scope" select="members"/>
cin
parents: 4
diff changeset
322 <xsl:variable name="member">
cin
parents: 4
diff changeset
323 <xsl:call-template name="getMembers">
cin
parents: 4
diff changeset
324 <xsl:with-param name="memberName" select="$memberName"/>
cin
parents: 4
diff changeset
325 <xsl:with-param name="type" select="$type"/>
cin
parents: 4
diff changeset
326 </xsl:call-template>
cin
parents: 4
diff changeset
327 </xsl:variable>
cin
parents: 4
diff changeset
328
cin
parents: 4
diff changeset
329 <xsl:apply-templates select="exsl:node-set($member)" mode="clr-member-reference"/>
cin
parents: 4
diff changeset
330 </xsl:template>
cin
parents: 4
diff changeset
331
cin
parents: 4
diff changeset
332 <xsl:template match="*" mode="clr-member-reference">
6
1f4009d4afb6 working on model to csharp transform
cin
parents: 5
diff changeset
333 <xsl:param name="type" select="@declaringType"/>
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
334 <cs:member>
5
cin
parents: 4
diff changeset
335 <xsl:attribute name="name">
cin
parents: 4
diff changeset
336 <xsl:apply-templates select="." mode="member-name"/>
cin
parents: 4
diff changeset
337 </xsl:attribute>
cin
parents: 4
diff changeset
338 <xsl:call-template name="getClrType">
cin
parents: 4
diff changeset
339 <xsl:with-param name="type" select="$type"/>
cin
parents: 4
diff changeset
340 </xsl:call-template>
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
341 </cs:member>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
342 </xsl:template>
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
343
3
437127ab6a12 non-working version
cin
parents: 2
diff changeset
344 <!-- resolves CLR type for the given type -->
437127ab6a12 non-working version
cin
parents: 2
diff changeset
345 <xsl:template name="getClrType">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
346 <xsl:param name="type" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
347 <xsl:param name="typeArgs" select="/.." />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
348 <!-- <t:trace msg="resolveClrType {$type}"/> -->
437127ab6a12 non-working version
cin
parents: 2
diff changeset
349 <xsl:for-each select="$module">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
350 <xsl:apply-templates select="key('type', $type)"
437127ab6a12 non-working version
cin
parents: 2
diff changeset
351 mode="clr-type">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
352 <xsl:with-param name="typeArgs" select="$typeArgs"/>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
353 </xsl:apply-templates>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
354 </xsl:for-each>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
355 </xsl:template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
356
437127ab6a12 non-working version
cin
parents: 2
diff changeset
357 <!-- CLR type construction -->
437127ab6a12 non-working version
cin
parents: 2
diff changeset
358 <xsl:template match="*" mode="clr-type" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
359
437127ab6a12 non-working version
cin
parents: 2
diff changeset
360 <xsl:template match="m:type[clr:type]" mode="clr-type">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
361 <xsl:param name="typeArgs" select="clr:type/*" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
362 <xsl:apply-templates select="clr:type" mode="clr-type">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
363 <xsl:with-param name="typeArgs" select="$typeArgs" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
364 </xsl:apply-templates>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
365 </xsl:template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
366
437127ab6a12 non-working version
cin
parents: 2
diff changeset
367 <xsl:template match="m:entity" mode="clr-type">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
368 <cs:type name="{@clr:name | @name[not(../@clr:name)]}" namespace="{ancestor::*[@clr:namespace]/@clr:namespace}" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
369 </xsl:template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
370
437127ab6a12 non-working version
cin
parents: 2
diff changeset
371 <xsl:template match="clr:type" mode="clr-type">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
372 <xsl:apply-templates mode="clr-type"/>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
373 </xsl:template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
374
437127ab6a12 non-working version
cin
parents: 2
diff changeset
375 <xsl:template match="clr:type[@ref]" mode="clr-type">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
376 <xsl:param name="typeArgs" select="*" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
377 <xsl:call-template name="getClrType">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
378 <xsl:with-param name="type" select="@ref" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
379 <xsl:with-param name="typeArgs" select="$typeArgs" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
380 </xsl:call-template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
381 </xsl:template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
382
437127ab6a12 non-working version
cin
parents: 2
diff changeset
383 <xsl:template match="clr:type[@cs:name or @name]" mode="clr-type">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
384 <xsl:param name="typeArgs" select="*" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
385 <xsl:variable name="ns"
437127ab6a12 non-working version
cin
parents: 2
diff changeset
386 select="@cs:namespace | @namespace[not(../@cs:namespace)]" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
387 <cs:type name="{@cs:name | @name[not(../@cs:name)]}">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
388 <xsl:if test="$ns">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
389 <xsl:attribute name="namespace"><xsl:value-of select="$ns" /></xsl:attribute>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
390 </xsl:if>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
391 <xsl:copy-of select="@struct"/>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
392
437127ab6a12 non-working version
cin
parents: 2
diff changeset
393 <xsl:apply-templates select="$typeArgs | *[not($typeArgs)]"
437127ab6a12 non-working version
cin
parents: 2
diff changeset
394 mode="clr-type" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
395 </cs:type>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
396 </xsl:template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
397
437127ab6a12 non-working version
cin
parents: 2
diff changeset
398 <xsl:template match="clr:arrayOf[@type]" mode="clr-type">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
399 <xsl:param name="typeArgs" select="*" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
400 <cs:array>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
401 <xsl:call-template name="getClrType">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
402 <xsl:with-param name="type" select="@type" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
403 <xsl:with-param name="typeArgs" select="$typeArgs" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
404 </xsl:call-template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
405 </cs:array>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
406 </xsl:template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
407
437127ab6a12 non-working version
cin
parents: 2
diff changeset
408 <xsl:template match="clr:arrayOf[@cs:name or @name]" mode="clr-type">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
409 <xsl:param name="typeArgs" select="*" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
410 <xsl:variable name="ns"
437127ab6a12 non-working version
cin
parents: 2
diff changeset
411 select="@cs:namespace | @namespace[not(../@cs:namespace)]" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
412 <cs:array>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
413 <cs:type name="{@cs:name | @name[not(../@cs:name)]}">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
414 <xsl:if test="$ns">
437127ab6a12 non-working version
cin
parents: 2
diff changeset
415 <xsl:attribute name="namespace"><xsl:value-of
437127ab6a12 non-working version
cin
parents: 2
diff changeset
416 select="$ns" /></xsl:attribute>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
417 </xsl:if>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
418 <xsl:apply-templates select="$typeArgs | *[not($typeArgs)]"
437127ab6a12 non-working version
cin
parents: 2
diff changeset
419 mode="clr-type" />
437127ab6a12 non-working version
cin
parents: 2
diff changeset
420 </cs:type>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
421 </cs:array>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
422 </xsl:template>
437127ab6a12 non-working version
cin
parents: 2
diff changeset
423
2
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
424
035de8b7b18e Temporary commit, refactoring, added readme
cin
parents:
diff changeset
425 </xsl:stylesheet>