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

sync
author cin
date Tue, 06 Mar 2018 19:27:25 +0300
parents 1f4009d4afb6
children
comparison
equal deleted inserted replaced
6:1f4009d4afb6 7:3fe157be5141
71 71
72 <!-- generate members --> 72 <!-- generate members -->
73 73
74 <xsl:template match="*|text()" mode="members" /> 74 <xsl:template match="*|text()" mode="members" />
75 75
76 <xsl:template match="m:primaryKey | m:property | m:thisKey | clr:association" mode="members"> 76 <xsl:template match="m:primaryKey | m:property" mode="members">
77 <t:trace msg="{name()} {@name}"/> 77 <t:trace msg="{name()} {@name}"/>
78 <xsl:apply-templates select="." mode="property"/> 78 <xsl:apply-templates select="." mode="property"/>
79 </xsl:template> 79 </xsl:template>
80 80
81 <!-- hasA and hasMany doesn't generate members itself, they delegate this work to inner members -->
82 <xsl:template match="m:hasA | m:hasMany" mode="members">
83 <t:trace msg="{name()} {@name}" />
84 <xsl:apply-templates mode="members" />
85 </xsl:template>
86
87 <xsl:template match="m:hasA/clr:lazy" mode="members">
88 <xsl:apply-templates select="." mode="field"/>
89 </xsl:template>
90
91 <!-- member-name --> 81 <!-- member-name -->
92 <xsl:template match="*|text()|@*" mode="member-name" /> 82 <xsl:template match="*|text()|@*" mode="member-name" />
93 83
94 <xsl:template match="*[@name]" mode="member-name"> 84 <xsl:template match="*[@name]" mode="member-name">
95 <xsl:value-of select="@name"/> 85 <xsl:value-of select="@name"/>