[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/vendor/propel-generator/resources/xsd/ -> database.xsd (source)

   1  <?xml version="1.0" encoding="ISO-8859-1"?>
   2  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   3      <!-- XML Schema for the Propel schema file
   4            This is just the first draft derived from the existing DTD
   5            and some additional restrictions have been included
   6  
   7            Comments are a quite rare, I guess most things are pretty
   8            readable. An additional xml schema: custom_datatypes.xsd is
   9            also included. For now this file is unused, but that will
  10            change; don't worry.
  11  
  12            Ron -->
  13  
  14      <xs:include schemaLocation="custom_datatypes.xsd"/>
  15  
  16      <xs:element name="database" type="database"/>
  17      <xs:element name="vendor" type="vendor"/>
  18  
  19      <xs:simpleType name="file">
  20          <xs:restriction base="xs:string">
  21              <!-- Match any relative or absolute path and file containing letters, numbers and _ -->
  22              <xs:pattern value="((\.{1,2}|[\w_]*)/)*([\w_]*\.?)+"/>
  23          </xs:restriction>
  24      </xs:simpleType>
  25  
  26      <xs:simpleType name="default_datatypes">
  27          <xs:restriction base="xs:string">
  28              <xs:enumeration value="BIT"/>
  29              <xs:enumeration value="TINYINT"/>
  30              <xs:enumeration value="SMALLINT"/>
  31              <xs:enumeration value="INTEGER"/>
  32              <xs:enumeration value="BIGINT"/>
  33              <xs:enumeration value="FLOAT"/>
  34              <xs:enumeration value="REAL"/>
  35              <xs:enumeration value="NUMERIC"/>
  36              <xs:enumeration value="DECIMAL"/>
  37              <xs:enumeration value="CHAR"/>
  38              <xs:enumeration value="VARCHAR"/>
  39              <xs:enumeration value="LONGVARCHAR"/>
  40              <xs:enumeration value="DATE"/>
  41              <xs:enumeration value="TIME"/>
  42              <xs:enumeration value="TIMESTAMP"/>
  43              <xs:enumeration value="BINARY"/>
  44              <xs:enumeration value="VARBINARY"/>
  45              <xs:enumeration value="LONGVARBINARY"/>
  46              <xs:enumeration value="NULL"/>
  47              <xs:enumeration value="OTHER"/>
  48              <xs:enumeration value="PHP_OBJECT"/>
  49              <xs:enumeration value="DISTINCT"/>
  50              <xs:enumeration value="STRUCT"/>
  51              <xs:enumeration value="ARRAY"/>
  52              <xs:enumeration value="BLOB"/>
  53              <xs:enumeration value="CLOB"/>
  54              <xs:enumeration value="REF"/>
  55              <xs:enumeration value="BOOLEANINT"/>
  56              <xs:enumeration value="BOOLEANCHAR"/>
  57              <xs:enumeration value="DOUBLE"/>
  58              <xs:enumeration value="BOOLEAN"/>
  59          </xs:restriction>
  60      </xs:simpleType>
  61  
  62      <xs:simpleType name="datatype">
  63          <xs:union memberTypes="default_datatypes custom_datatypes"/>
  64      </xs:simpleType>
  65  
  66      <xs:simpleType name="dbidmethod">
  67          <xs:restriction base="xs:string">
  68              <xs:enumeration value="native"/>
  69              <xs:enumeration value="none"/>
  70          </xs:restriction>
  71      </xs:simpleType>
  72  
  73      <xs:simpleType name="tbidmethod">
  74          <xs:restriction base="xs:string">
  75              <xs:enumeration value="autoincrement"/>
  76              <xs:enumeration value="sequence"/>
  77              <xs:enumeration value="null"/>
  78          </xs:restriction>
  79      </xs:simpleType>
  80  
  81      <xs:simpleType name="idmethod">
  82          <xs:union memberTypes="dbidmethod tbidmethod"/>
  83      </xs:simpleType>
  84  
  85      <xs:simpleType name="phpnamingmethod">
  86          <xs:restriction base="xs:string">
  87              <xs:enumeration value="nochange"/>
  88              <xs:enumeration value="underscore"/>
  89              <xs:enumeration value="phpname"/>
  90          </xs:restriction>
  91      </xs:simpleType>
  92  
  93      <xs:simpleType name="delete">
  94          <xs:restriction base="xs:string">
  95              <xs:enumeration value="cascade"/>
  96              <xs:enumeration value="set null"/>
  97              <xs:enumeration value="setnull"/>
  98              <xs:enumeration value="restrict"/>
  99              <xs:enumeration value="none"/>
 100              <xs:enumeration value=""/>
 101          </xs:restriction>
 102      </xs:simpleType>
 103  
 104      <xs:simpleType name="update">
 105          <xs:restriction base="xs:string">
 106              <xs:enumeration value="cascade"/>
 107              <xs:enumeration value="setnull"/>
 108              <xs:enumeration value="set null"/>
 109              <xs:enumeration value="restrict"/>
 110              <xs:enumeration value="none"/>
 111              <xs:enumeration value=""/>
 112          </xs:restriction>
 113      </xs:simpleType>
 114  
 115      <xs:simpleType name="rulename">
 116          <xs:restriction base="xs:string">
 117              <xs:enumeration value="mask"/>
 118              <xs:enumeration value="maxLength"/>
 119              <xs:enumeration value="maxValue"/>
 120              <xs:enumeration value="minLength"/>
 121              <xs:enumeration value="minValue"/>
 122              <xs:enumeration value="required"/>
 123              <xs:enumeration value="unique"/>
 124              <xs:enumeration value="validValues"/>
 125              <xs:enumeration value="notMatch"/>
 126              <xs:enumeration value="match"/>
 127              <xs:enumeration value="class"/>
 128          </xs:restriction>
 129      </xs:simpleType>
 130  
 131      <xs:simpleType name="inh_option">
 132          <xs:restriction base="xs:string">
 133              <xs:enumeration value="single"/>
 134              <xs:enumeration value="false"/>
 135          </xs:restriction>
 136      </xs:simpleType>
 137  
 138      <xs:simpleType name="php_type">
 139          <xs:restriction base="xs:string">
 140              <xs:enumeration value="primitive"/>
 141              <xs:enumeration value="object"/>
 142          </xs:restriction>
 143      </xs:simpleType>
 144  
 145      <!-- Restrict column name to letters (upper- and lowercase), numbers and the _ -->
 146      <xs:simpleType name="column_name">
 147          <xs:restriction base="xs:string">
 148              <xs:pattern value="[\w_]+"/>
 149          </xs:restriction>
 150      </xs:simpleType>
 151  
 152      <!-- Restrict php name to letters (upper- and lowercase), numbers and the _ -->
 153      <xs:simpleType name="php_name">
 154          <xs:restriction base="xs:string">
 155              <xs:pattern value="[\w_]+"/>
 156          </xs:restriction>
 157      </xs:simpleType>
 158  
 159      <!-- Restrict php class name to letters (upper- and lowercase), numbers and the _. Dot seperated -->
 160      <xs:simpleType name="php_class">
 161          <xs:restriction base="xs:string">
 162              <xs:pattern value="([\w_]+.?)+"/>
 163          </xs:restriction>
 164      </xs:simpleType>
 165  
 166      <!-- Restrict table name to letters (upper- and lowercase), numbers and the _ -->
 167      <xs:simpleType name="table_name">
 168          <xs:restriction base="xs:string">
 169              <xs:pattern value="[\w_]+"/>
 170          </xs:restriction>
 171      </xs:simpleType>
 172  
 173      <!-- Restrict index name to letters (upper- and lowercase), numbers and the _ -->
 174      <xs:simpleType name="index_name">
 175          <xs:restriction base="xs:string">
 176              <xs:pattern value="[\w_]+"/>
 177          </xs:restriction>
 178      </xs:simpleType>
 179  
 180      <!-- Restrict foreign column name to letters (upper- and lowercase), numbers and the _ -->
 181      <xs:simpleType name="foreign_name">
 182          <xs:restriction base="xs:string">
 183              <xs:pattern value="[\w_]+"/>
 184          </xs:restriction>
 185      </xs:simpleType>
 186  
 187      <xs:complexType name="parameter">
 188          <xs:attribute name="name" type="xs:string" use="required"/>
 189          <xs:attribute name="value" type="xs:string" use="required"/>
 190      </xs:complexType>
 191  
 192      <xs:complexType name="validator">
 193          <xs:sequence>
 194              <xs:element name="rule" type="rule" maxOccurs="unbounded"/>
 195          </xs:sequence>
 196          <xs:attribute name="column" type="column_name" use="required"/>
 197          <xs:attribute name="translate" type="xs:string" use="optional"/>
 198      </xs:complexType>
 199  
 200      <xs:complexType name="vendor">
 201          <xs:sequence>
 202              <xs:element name="parameter" type="parameter" maxOccurs="unbounded"/>
 203          </xs:sequence>
 204          <xs:attribute name="type" use="required"/>
 205      </xs:complexType>
 206  
 207      <xs:complexType name="rule">
 208          <xs:attribute name="name" type="rulename" use="required"/>
 209          <xs:attribute name="value" type="xs:string" use="optional"/>
 210          <xs:attribute name="size" type="xs:positiveInteger" use="optional"/>
 211          <xs:attribute name="message" type="xs:string" use="optional"/>
 212          <xs:attribute name="class" type="xs:string" use="optional"/>
 213      </xs:complexType>
 214  
 215      <xs:complexType name="id-method-parameter">
 216          <xs:attribute name="name" type="xs:string" use="optional"/>
 217          <xs:attribute name="value" type="xs:string" use="required"/>
 218      </xs:complexType>
 219  
 220      <xs:complexType name="index">
 221          <xs:choice maxOccurs="unbounded">
 222              <xs:element name="index-column" type="index-column" minOccurs="1" maxOccurs="unbounded"/>
 223              <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
 224          </xs:choice>
 225          <xs:attribute name="name" type="index_name" use="optional"/>
 226      </xs:complexType>
 227  
 228      <xs:complexType name="unique">
 229          <xs:choice maxOccurs="unbounded">
 230              <xs:element name="unique-column" type="unique-column" minOccurs="1" maxOccurs="unbounded"/>
 231              <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
 232          </xs:choice>
 233          <xs:attribute name="name" type="index_name" use="optional"/>
 234      </xs:complexType>
 235  
 236      <xs:complexType name="index-column">
 237          <xs:sequence>
 238              <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
 239          </xs:sequence>
 240          <xs:attribute name="name" type="column_name" use="required"/>
 241          <xs:attribute name="size" type="xs:positiveInteger" use="optional"/>
 242      </xs:complexType>
 243  
 244      <xs:complexType name="unique-column">
 245          <xs:sequence>
 246              <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
 247          </xs:sequence>
 248          <xs:attribute name="name" type="column_name" use="required"/>
 249          <xs:attribute name="size" type="xs:positiveInteger" use="optional"/>
 250      </xs:complexType>
 251  
 252      <xs:complexType name="inheritance">
 253          <xs:attribute name="key" type="xs:string" use="required"/>
 254          <xs:attribute name="class" type="xs:string" use="required"/>
 255          <xs:attribute name="package" type="xs:string" use="optional"/>
 256          <xs:attribute name="extends" type="xs:string" use="optional"/>
 257      </xs:complexType>
 258  
 259      <xs:complexType name="reference">
 260          <xs:attribute name="local" type="column_name" use="required"/>
 261          <xs:attribute name="foreign" type="column_name" use="required"/>
 262      </xs:complexType>
 263  
 264      <xs:complexType name="column">
 265          <xs:choice maxOccurs="unbounded">
 266              <xs:element name="inheritance" type="inheritance" minOccurs="0" maxOccurs="unbounded"/>
 267              <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
 268          </xs:choice>
 269          <xs:attribute name="name" type="column_name" use="required"/>
 270          <xs:attribute name="phpName" type="php_name" use="optional"/>
 271          <xs:attribute name="peerName" type="php_class" use="optional"/>
 272          <xs:attribute name="primaryKey" type="xs:boolean" default="false"/>
 273          <xs:attribute name="required" type="xs:boolean" default="false"/>
 274          <xs:attribute name="type" type="datatype" default="VARCHAR"/>
 275          <xs:attribute name="phpType" type="php_type" use="optional"/>
 276          <xs:attribute name="size" type="xs:nonNegativeInteger" use="optional"/>
 277          <xs:attribute name="scale" type="xs:nonNegativeInteger" use="optional"/>
 278          <xs:attribute name="default" type="xs:string" use="optional"/>
 279          <xs:attribute name="autoIncrement" type="xs:boolean" default="false"/>
 280          <xs:attribute name="inheritance" type="inh_option" default="false"/>
 281          <xs:attribute name="inputValidator" type="xs:string" use="optional"/>
 282          <xs:attribute name="phpNamingMethod" type="phpnamingmethod" use="optional"/>
 283          <xs:attribute name="description" type="xs:string" use="optional"/>
 284          <xs:attribute name="lazyLoad" type="xs:boolean" default="false"/>
 285          <xs:attribute name="nodeKeySep" type="xs:string" use="optional"/> <!-- missing in the old DTD, but required to keep the treetest example working -->
 286          <xs:attribute name="nodeKey" type="xs:string" use="optional"/> <!-- missing in the old DTD, but required to keep the treetest example working -->
 287          <xs:attribute name="require" type="xs:string" use="optional"/>
 288      </xs:complexType>
 289  
 290      <xs:complexType name="foreign-key">
 291          <xs:choice maxOccurs="unbounded">
 292              <xs:element name="reference" type="reference" minOccurs="1" maxOccurs="unbounded"/>
 293              <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
 294          </xs:choice>
 295          <xs:attribute name="foreignTable" type="table_name" use="required"/>
 296          <xs:attribute name="name" type="foreign_name" use="optional"/>
 297          <xs:attribute name="onDelete" type="delete" default="none"/>
 298          <xs:attribute name="onUpdate" type="update" default="none"/>
 299      </xs:complexType>
 300  
 301      <xs:complexType name="external-schema">
 302          <xs:attribute name="filename" type="file" use="required"/>
 303      </xs:complexType>
 304  
 305      <xs:complexType name="table">
 306          <xs:choice maxOccurs="unbounded">
 307              <xs:element name="column" type="column" maxOccurs="unbounded"/>
 308              <xs:element name="foreign-key" type="foreign-key" minOccurs="0" maxOccurs="unbounded"/>
 309              <xs:element name="index" type="index" minOccurs="0" maxOccurs="unbounded"/>
 310              <xs:element name="unique" type="unique" minOccurs="0" maxOccurs="unbounded"/>
 311              <xs:element name="id-method-parameter" type="id-method-parameter" minOccurs="0" maxOccurs="unbounded"/>
 312              <xs:element name="validator" type="validator" minOccurs="0" maxOccurs="unbounded"/>
 313              <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
 314          </xs:choice>
 315          <xs:attribute name="name" type="table_name" use="required"/>
 316          <xs:attribute name="phpName" type="php_class" use="optional"/>
 317          <xs:attribute name="idMethod" type="idmethod" use='optional'/>
 318          <xs:attribute name="skipSql" type="xs:boolean" default="false"/>
 319          <xs:attribute name="readOnly" type="xs:boolean" default="false"/>
 320          <xs:attribute name="abstract" type="xs:boolean" default="false"/>
 321          <xs:attribute name="baseClass" type="php_class" use="optional"/>
 322          <xs:attribute name="basePeer" type="php_class" use="optional"/>
 323          <xs:attribute name="alias" type="table_name" use="optional"/>
 324          <xs:attribute name="package" type="xs:string" use="optional"/>
 325          <xs:attribute name="interface" type="xs:string" use="optional"/>
 326          <xs:attribute name="phpNamingMethod" type="phpnamingmethod" use='optional'/>
 327          <xs:attribute name="heavyIndexing" type="xs:boolean" use="optional"/>
 328          <xs:attribute name="description" type="xs:string"/>
 329          <xs:attribute name="isTree" type="xs:boolean" use="optional"/> <!-- missing in the old DTD, but required to keep the treetest example working -->
 330      </xs:complexType>
 331  
 332      <xs:complexType name="database">
 333          <xs:choice maxOccurs="unbounded">
 334              <xs:element name="external-schema" type="external-schema" minOccurs="0" maxOccurs="unbounded"/>
 335              <xs:element name="table" type="table" minOccurs="1" maxOccurs="unbounded"/>
 336          </xs:choice>
 337          <xs:attribute name="name" type="xs:string" use="optional"/>
 338          <xs:attribute name="defaultIdMethod" type="dbidmethod" default="none"/>
 339          <xs:attribute name="defaultTranslateMethod" type="xs:string" use="optional"/>
 340          <xs:attribute name="package" type="php_class" use="optional"/>
 341          <xs:attribute name="baseClass" type="php_class" use="optional"/>
 342          <xs:attribute name="basePeer" type="php_class" use="optional"/>
 343          <xs:attribute name="defaultPhpNamingMethod" type="phpnamingmethod" default="underscore"/>
 344          <xs:attribute name="heavyIndexing" type="xs:boolean" default="false"/>
 345      </xs:complexType>
 346  </xs:schema>


Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7