comparison xslt/generator.csharp.xsl @ 4:d240adc2ac70

sync
author cin
date Thu, 01 Mar 2018 16:53:23 +0300
parents 437127ab6a12
children 6f67d3a6b950
comparison
equal deleted inserted replaced
3:437127ab6a12 4:d240adc2ac70
24 <xsl:template match="m:entity" mode="document"> 24 <xsl:template match="m:entity" mode="document">
25 <xsl:apply-templates select="." mode="entity"/> 25 <xsl:apply-templates select="." mode="entity"/>
26 </xsl:template> 26 </xsl:template>
27 27
28 <xsl:template match="m:entity" mode="entity"> 28 <xsl:template match="m:entity" mode="entity">
29 <xsl:variable name="members">
30 <xsl:apply-templates mode="fiter-members"/>
31 </xsl:variable>
29 <cs:class modifiers="partial"> 32 <cs:class modifiers="partial">
30 <xsl:attribute name="name"> 33 <xsl:attribute name="name">
31 <xsl:apply-templates select="." mode="class-name"/> 34 <xsl:apply-templates select="." mode="class-name"/>
32 </xsl:attribute> 35 </xsl:attribute>
33 <xsl:apply-templates mode="class-attributes" /> 36 <xsl:apply-templates mode="class-attributes" />
34 <xsl:apply-templates mode="members" /> 37 <xsl:apply-templates select="exsl:node-set($members)" mode="members" />
35 </cs:class> 38 </cs:class>
36 </xsl:template> 39 </xsl:template>
37 40
38 <!-- class-name --> 41 <!-- class-name -->
39 <xsl:template match="*[@name]" mode="class-name"> 42 <xsl:template match="*[@name]" mode="class-name">
59 <xsl:template match="*|text()" mode="members" /> 62 <xsl:template match="*|text()" mode="members" />
60 63
61 <xsl:template match="m:primaryKey | m:property | m:thisKey | clr:association" mode="members"> 64 <xsl:template match="m:primaryKey | m:property | m:thisKey | clr:association" mode="members">
62 <t:trace msg="{name()} {@name}"/> 65 <t:trace msg="{name()} {@name}"/>
63 <xsl:apply-templates select="." mode="property"/> 66 <xsl:apply-templates select="." mode="property"/>
67 </xsl:template>
68
69 <xsl:template match="m:thisKey" mode="members">
70 <xsl:variable name="properties">
71
72 </xsl:variable>
64 </xsl:template> 73 </xsl:template>
65 74
66 <!-- hasA and hasMany doesn't generate members itself, they delegate this work to inner members --> 75 <!-- hasA and hasMany doesn't generate members itself, they delegate this work to inner members -->
67 <xsl:template match="m:hasA | m:hasMany" mode="members"> 76 <xsl:template match="m:hasA | m:hasMany" mode="members">
68 <t:trace msg="{name()} {@name}" /> 77 <t:trace msg="{name()} {@name}" />