/[volute]/trunk/projects/theory/snapdm/res/jpa.xsl
ViewVC logotype

Diff of /trunk/projects/theory/snapdm/res/jpa.xsl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 421 by bourges.laurent, Wed May 7 18:30:32 2008 UTC revision 422 by gerard.lemson, Thu May 8 16:52:53 2008 UTC
# Line 6  Line 6 
6  <!ENTITY bl "<xsl:text> </xsl:text>">  <!ENTITY bl "<xsl:text> </xsl:text>">
7  ]>  ]>
8    
9  <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10                                                                    xmlns:exsl="http://exslt.org/common"
11                    extension-element-prefixes="exsl">
12    
13    <!--    <!--
14      Common templates used by XSLT scripts      Common templates used by XSLT scripts
# Line 20  Line 22 
22    
23        
24        
25    <xsl:template match="objectType|dataType" mode="JPAAnnotation">    <xsl:template match="objectType" mode="JPAAnnotation">
26      <xsl:variable name="className" select="name" />      <xsl:variable name="className" select="name" />
27      <xsl:variable name="xmiid" select="@xmiid" />      <xsl:variable name="xmiid" select="@xmiid" />
28      <xsl:variable name="childMod">      <xsl:variable name="childMod">
# Line 67  Line 69 
69    
70    
71  <!-- work in progress -->    <!-- work in progress -->  
72    
73      <xsl:template match="dataType" mode="JPAAnnotation">
74        <xsl:text>@Embeddable</xsl:text>&cr;
75      </xsl:template>
76    
77    
78    
79    
80        
81    
82        
# Line 102  Line 112 
112            <xsl:with-param name="columnName"><xsl:apply-templates select="." mode="columnName"/></xsl:with-param>            <xsl:with-param name="columnName"><xsl:apply-templates select="." mode="columnName"/></xsl:with-param>
113          </xsl:call-template>          </xsl:call-template>
114        </xsl:when>        </xsl:when>
115        <xsl:when test="name($type) = 'dataType'">        <xsl:when test="name($type) = 'dataType'">
116      @Transient        <xsl:variable name="columns">
117            <xsl:apply-templates select="." mode="columns"/>
118          </xsl:variable>
119        @Embedded
120        @AttributeOverrides ({
121         <xsl:for-each select="exsl:node-set($columns)/column">
122           <xsl:if test="position() > 1">,&cr;</xsl:if>
123           @AttributeOverride(name="<xsl:value-of select="attrname"/>",column=@Column(name="<xsl:value-of select="name"/>"))
124         </xsl:for-each>
125        })
126      <xsl:comment>TODO ATTRIBUTE : dataType </xsl:comment>      <xsl:comment>TODO ATTRIBUTE : dataType </xsl:comment>
127        </xsl:when>        </xsl:when>
128        <xsl:otherwise>        <xsl:otherwise>

Legend:
Removed from v.421  
changed lines
  Added in v.422

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26