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.
51 lines
1.8 KiB
51 lines
1.8 KiB
<?xml version="1.0" encoding="UTF-8" ?> |
|
<!-- Änderungen |
|
23.6.04 MB Type blueprintview und blueprintviewInteger |
|
--> |
|
<xsl:stylesheet version="1.0" |
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|
<xsl:template name="create_view"> |
|
<xsl:call-template name="log"> |
|
<xsl:with-param name="msg" select="concat('Erzeuge View ',@name)" /> |
|
</xsl:call-template> |
|
<xsl:choose> |
|
<xsl:when test="@type='blueprintview'"> |
|
<xsl:text> create view </xsl:text><xsl:value-of select="@name" /><xsl:text> (variant,name,key, |
|
parent,sql,validfrom,validtill,label,sort1,sort2,sort3,sort4,sortc1,sortc2 ) as |
|
select variant,name,key,parent,sql,validfrom,validtill,label,sort1,sort2,sort3,sort4,sortc1,sortc2 from joolap_blueprints |
|
where blueprint='</xsl:text><xsl:value-of select="@name" /><xsl:text>'; |
|
</xsl:text> |
|
</xsl:when> |
|
<xsl:when test="@type='blueprintviewInteger'"> |
|
<xsl:text> create view </xsl:text><xsl:value-of select="@name" /><xsl:text> (variant,name,key, |
|
parent,sql,validfrom,validtill,label,sort1,sort2,sort3,sort4,sortc1,sortc2 ) as |
|
select variant,name,keyint,parentint,sql,validfrom,validtill,label,sort1,sort2,sort3,sort4,sortc1,sortc2 from joolap_blueprints |
|
where blueprint='</xsl:text><xsl:value-of select="@name" /><xsl:text>'; |
|
</xsl:text> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:text>create view </xsl:text><xsl:value-of select="@name" /> |
|
<xsl:text>( |
|
</xsl:text> |
|
<xsl:call-template name="column_names" /> |
|
<xsl:text>) as |
|
</xsl:text> |
|
<xsl:for-each select="sql"> |
|
<xsl:choose> |
|
<xsl:when test="@dbsystem=''"> |
|
<xsl:value-of select="." /> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:if test="@dbsystem=$dbsystem" > |
|
<xsl:value-of select="." /> |
|
</xsl:if> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
</xsl:for-each> |
|
|
|
<xsl:text>; |
|
</xsl:text> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
</xsl:template> |
|
</xsl:stylesheet>
|
|
|