You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
43 lines
1.1 KiB
<?xml version="1.0" encoding="UTF-8" ?> |
|
<xsl:stylesheet version="1.0" |
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|
<xsl:template name="sx_constraint1"> |
|
<xsl:param name="dbsystem" /> |
|
<xsl:choose> |
|
<xsl:when test="$dbsystem='POSTGRES' or $dbsystem='HSQLDB'"> |
|
<xsl:text>, |
|
constraint </xsl:text> |
|
<xsl:for-each select="fld"> |
|
<xsl:if test="@name ='pk_name'"> |
|
<xsl:value-of select="." /> |
|
</xsl:if> |
|
</xsl:for-each> |
|
<xsl:text> primary key (</xsl:text> |
|
</xsl:when> |
|
<xsl:when test="$dbsystem='INFORMIX'"> |
|
<xsl:text>, |
|
primary key </xsl:text> |
|
<xsl:text>(</xsl:text> |
|
</xsl:when> |
|
</xsl:choose> |
|
</xsl:template> |
|
|
|
<xsl:template name="sx_constraint2"> |
|
<xsl:param name="dbsystem" /> |
|
<xsl:choose> |
|
<xsl:when test="$dbsystem='POSTGRES' or $dbsystem='HSQLDB'"> |
|
<xsl:text>) |
|
</xsl:text> |
|
</xsl:when> |
|
<xsl:when test="$dbsystem='INFORMIX'"> |
|
<xsl:text>) |
|
constraint </xsl:text> |
|
<xsl:for-each select="fld"> |
|
<xsl:if test="@name ='pk_name'"> |
|
<xsl:value-of select="substring(.,1,30)" /> |
|
</xsl:if> |
|
</xsl:for-each> |
|
</xsl:when> |
|
</xsl:choose> |
|
</xsl:template> |
|
</xsl:stylesheet>
|
|
|