Copied all the currently working transforms from 'transforms01' to 'transforms'; created new schema 'adl-0-1-0.xsd' which once tested should become the new
normative reference.
This commit is contained in:
parent
bf13d05877
commit
e2130bc4c4
20 changed files with 6161 additions and 3159 deletions
|
|
@ -7,13 +7,18 @@
|
|||
<!-- Purpose: -->
|
||||
<!-- XSL stylesheet to generate Postgresql [7|8] from ADL. -->
|
||||
<!-- -->
|
||||
<!-- Author: Simon Brooke <sb@cygnets.co.uk> -->
|
||||
<!-- Author: Simon Brooke <simon@weft.co.uk> -->
|
||||
<!-- Created: 24th January 2006 -->
|
||||
<!-- Copyright: (c) 2008 Cygnet Solutions -->
|
||||
<!-- Copyright: (c) 2006 Simon Brooke. -->
|
||||
<!-- -->
|
||||
<!-- This file is presently not up to date with changes in ADL -->
|
||||
<!-- -->
|
||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
||||
|
||||
<!--
|
||||
JACQUARD 2 APPLICATION DESCRIPTION LANGUAGE FRAMEWORK
|
||||
|
||||
$Revision: 1.1 $
|
||||
$Revision: 1.2 $
|
||||
|
||||
NOTES:
|
||||
|
||||
|
|
@ -30,15 +35,15 @@
|
|||
two removes (i.e. the 'distinguish' mechanism in ADL
|
||||
-->
|
||||
|
||||
<xsl:output indent="no" encoding="utf-8" method="text"/>
|
||||
<xsl:output indent="no" encoding="UTF-8" method="text"/>
|
||||
|
||||
<xsl:template match="application">
|
||||
-------------------------------------------------------------------------------------------------
|
||||
--
|
||||
-- Database for application <xsl:value-of select="@name"/> version <xsl:value-of select="@version"/>
|
||||
-- Generated for PostgreSQL [7|8] using adl2psql.xsl $Revision: 1.1 $
|
||||
-- Generated for PostgreSQL [7|8] using adl2psql.xsl $Revision: 1.2 $
|
||||
--
|
||||
-- Code generator (c) 2006 Simon Brooke [sb@cygnets.co.uk]
|
||||
-- Code generator (c) 2006 Simon Brooke [simon@weft.co.uk]
|
||||
-- http://www.weft.co.uk/library/jacquard/
|
||||
--
|
||||
-------------------------------------------------------------------------------------------------
|
||||
|
|
@ -84,7 +89,7 @@
|
|||
<xsl:template name="referentialintegrity">
|
||||
<xsl:param name="nearside"/>
|
||||
<!-- set up referential integrity constraints for primary tables -->
|
||||
ALTER TABLE <xsl:value-of select="$nearside"/> ADD CONSTRAINT ri_<xsl:value-of select="$nearside"/>_<xsl:value-of select="@name"/>
|
||||
ALTER TABLE <xsl:value-of select="$nearside"/> ADD CONSTRAINT ri_<xsl:value-of select="$nearside"/><xsl:value-of select="concat( '_', @name)"/>
|
||||
FOREIGN KEY ( <xsl:value-of select="@name"/>) REFERENCES <xsl:value-of select="@entity"/> ON DELETE NO ACTION;
|
||||
</xsl:template>
|
||||
|
||||
|
|
@ -122,9 +127,9 @@
|
|||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
-------------------------------------------------------------------------------------------------
|
||||
-- convenience view lv_<xsl:value-of select="@name"/> for lists
|
||||
-- convenience view lv<xsl:value-of select="concat( '_', @name)"/> for lists
|
||||
-------------------------------------------------------------------------------------------------
|
||||
CREATE VIEW lv_<xsl:value-of select="@name"/> AS
|
||||
CREATE VIEW lv<xsl:value-of select="concat( '_', @name)"/> AS
|
||||
SELECT <xsl:for-each select="property[@type!='link']">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type='entity'">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue