commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/common/utils/xml2sql README Makefile.sampl...


From: Jan Ischebeck
Subject: gnue/common/utils/xml2sql README Makefile.sampl...
Date: Fri, 26 Jul 2002 10:57:31 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Jan Ischebeck <address@hidden>  02/07/26 10:57:31

Modified files:
        common/utils/xml2sql: README Makefile.sample display.xsl 
Added files:
        common/utils/xml2sql: idx.png crn.png fkey.png 

Log message:
        updated display.xsl to show foreign keys, indexes, and primary keys 
(defined by index/constraint statement)
        add images for foreign keys, indexes and undefined constraints
        updated README and Makefile

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/utils/xml2sql/idx.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/utils/xml2sql/crn.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/utils/xml2sql/fkey.png?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/utils/xml2sql/README.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/utils/xml2sql/Makefile.sample.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/utils/xml2sql/display.xsl.diff?tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: gnue/common/utils/xml2sql/Makefile.sample
diff -c gnue/common/utils/xml2sql/Makefile.sample:1.2 
gnue/common/utils/xml2sql/Makefile.sample:1.3
*** gnue/common/utils/xml2sql/Makefile.sample:1.2       Tue Jul 23 17:40:21 2002
--- gnue/common/utils/xml2sql/Makefile.sample   Fri Jul 26 10:57:31 2002
***************
*** 2,8 ****
  # at the moment it requires the sablotron XSLT processor
  xsltcmd = sabcmd
  xslpath = ./
! src = sample.gsd
  
  
  all:  mysql pgsql mssql sybase html
--- 2,8 ----
  # at the moment it requires the sablotron XSLT processor
  xsltcmd = sabcmd
  xslpath = ./
! src = example.gsd
  
  
  all:  mysql pgsql mssql sybase html
Index: gnue/common/utils/xml2sql/README
diff -c gnue/common/utils/xml2sql/README:1.2 
gnue/common/utils/xml2sql/README:1.3
*** gnue/common/utils/xml2sql/README:1.2        Tue Jul 23 17:46:07 2002
--- gnue/common/utils/xml2sql/README    Fri Jul 26 10:57:31 2002
***************
*** 7,13 ****
  
  The format used for the database schema/table definitions is defined as
  GNUe Schema Definition ( GSD ). Database schemata can be created from
! real databases with the GNUe Designer. 
  
  To create an sql file you should first use the appropriate xsl file to
  convert the GNUe Schema Definition into database dependent XML file, then you
--- 7,14 ----
  
  The format used for the database schema/table definitions is defined as
  GNUe Schema Definition ( GSD ). Database schemata can be created from
! real databases with the GNUe Designer. A introduction into writing
! GNUe Schema Definitions can be found in Schema.txt
  
  To create an sql file you should first use the appropriate xsl file to
  convert the GNUe Schema Definition into database dependent XML file, then you
***************
*** 15,22 ****
  markupless sql. 
  
  f.e.
!   sabcmd pgsql.xsl test.gsd pgsql.xml
    sabcmd strip.command.xsl pgsql.xml pgsql.sql
  
  
  Contents of this directory:
--- 16,25 ----
  markupless sql. 
  
  f.e.
!   sabcmd pgsql.xsl example.gsd pgsql.xml
    sabcmd strip.command.xsl pgsql.xml pgsql.sql
+ or:
+   sabcmd pgsql.xsl example.gsd | sabcmd strip.command.xsl > pgsql.sql
  
  
  Contents of this directory:
***************
*** 36,44 ****
--- 39,55 ----
  mysql.xsl                  Style sheet for MySQL database
  
  pgsql.xsl                  Style sheet for PostgreSQL database
+ pgsql_2.xsl                Style sheet for PostgreSQL database (define foreign
+                            keys in table instead of altering table)
  
  strip.command.xsl          Style sheet for dropping XML mark up
   
  sybase.xsl                 Style sheet for Sybase database
  
  key.png, yes.png, no.png   Images used by the HTML representation of a GSD
+ 
+ example.gsd                A example for a GNUe Schema definition (can be used
+                            to test xsl files, because it holds all possible 
+                            definition types)
+ 
+ Schema.txt                 Introduction into creation of GNUe Schema files
Index: gnue/common/utils/xml2sql/display.xsl
diff -c gnue/common/utils/xml2sql/display.xsl:1.4 
gnue/common/utils/xml2sql/display.xsl:1.5
*** gnue/common/utils/xml2sql/display.xsl:1.4   Tue Jul 23 16:56:37 2002
--- gnue/common/utils/xml2sql/display.xsl       Fri Jul 26 10:57:31 2002
***************
*** 40,47 ****
--- 40,75 ----
        <tr class="{$tdclass}">
          <xsl:variable name="name"><xsl:value-of 
select="@name"/></xsl:variable>
          <td><xsl:value-of select="$name"/>
+ 
            <xsl:for-each select="../../primarykey/pkfield">
              <xsl:if test="@name = $name"><xsl:text> </xsl:text><img 
src="key.png"/></xsl:if>
+           </xsl:for-each>
+           <xsl:for-each select="../../indexes/index/idxfield">
+             <xsl:if test="@name = $name"><xsl:text> </xsl:text>
+               <xsl:choose>              
+                 <xsl:when test="../@type = &quot;unique&quot;">
+                    <img src="key.png"/>
+                 </xsl:when>
+                 <xsl:otherwise>
+                    <img src="idx.png"/>
+                 </xsl:otherwise>
+              </xsl:choose>
+             </xsl:if>
+           </xsl:for-each>
+           <xsl:for-each select="../../constraints/constraint/constraintfield">
+             <xsl:if test="@name = $name"><xsl:text> </xsl:text>
+               <xsl:choose>              
+                 <xsl:when test="../@type = &quot;unique&quot;">
+                    <img src="key.png"/>
+                 </xsl:when>
+                 <xsl:when test="../@type = &quot;foreignkey&quot;">
+                    <img src="fkey.png"/>
+                 </xsl:when>
+                 <xsl:otherwise>
+                    <img src="crn.png"/>
+                 </xsl:otherwise>
+              </xsl:choose>
+             </xsl:if>
            </xsl:for-each>
          </td>
          <td><xsl:value-of select="@type"/></td>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]