Java Reference
In-Depth Information
<xsl:apply-templates select="ejb-jar/enterprise-beans/entity" />
<xsl:apply-templates select="ejb-jar/relationships/ejb-relation"
/>
}
</xsl:template>
<xsl:variable name="lcletters">
abcdefghijklmnopqrstuvwxyz
</xsl:variable>
<xsl:variable name="ucletters">
ABCDEFGHIJKLMNOPQRSTUVWXYZ
</xsl:variable>
<xsl:template match="cmp-field">
<xsl:param name="varDecl" />
<xsl:param name="beanMethods" />
<xsl:param name="pkFields" />
<xsl:param name="constructorFields" />
<xsl:param name="constructor" />
<xsl:param name="constructorPK" />
<xsl:param name="primKeyField" />
<xsl:param name="fieldName" select="field-name" />
Create a constructor with primary key field as parameter:
<xsl:if test="$constructor='constructor'">
<xsl:if test="$primKeyField=$fieldName">
this.
<xsl:value-of
select="translate((substring(field-name,
1,1)),$ucletters,$lcletters)" />
<xsl:value-of select="substring(field-name,2)" />
=
<xsl:value-of
select="translate((substring(field-name, 1,1)),
$ucletters,$lcletters)" />
<xsl:value-of select="substring(field-name,2)" />
;
</xsl:if>
</xsl:if>
<xsl:if test="$varDecl='varDecl'">
private
<xsl:value-of select="field-type" />
<xsl:text> </xsl:text>
<xsl:value-of select="field-name" />
;
<xsl:text disable-output-escaping="yes">
 
Search WWH ::




Custom Search