123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping"
- xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping"
- elementFormDefault="qualified">
- <xs:annotation>
- <xs:documentation><![CDATA[
- This is the XML Schema for the object/relational
- mapping file used by the Doctrine Extensions by Gedmo
- extensions
- Doctrine component version support: 2.2.x
- ]]></xs:documentation>
- </xs:annotation>
- <!--
- It would be nice if we could force the gedmo with only necessary elements into each of doctrine elements.
- Patches that do that are more than welcome.
- Please note, that marking e.g filed element in xml document with xsi:type is not an option as we need to allow other
- people to push their own additional attributes/elements into the same field element and they should not extend our schema
- -->
- <!-- entity -->
- <xs:element name="translation" type="gedmo:translation"/>
- <xs:element name="tree" type="gedmo:tree"/>
- <xs:element name="tree-closure" type="gedmo:tree-closure"/>
- <xs:element name="loggable" type="gedmo:loggable"/>
- <xs:element name="soft-deleteable" type="gedmo:soft-deleteable"/>
- <xs:element name="uploadable" type="gedmo:uploadable"/>
- <!-- field -->
- <xs:element name="slug" type="gedmo:slug"/>
- <xs:element name="translatable" type="gedmo:translatable"/>
- <xs:element name="timestampable" type="gedmo:timestampable"/>
- <xs:element name="blameable" type="gedmo:blameable"/>
- <xs:element name="versioned" type="gedmo:emptyType"/>
- <xs:element name="tree-left" type="gedmo:emptyType"/>
- <xs:element name="tree-right" type="gedmo:emptyType"/>
- <xs:element name="tree-level" type="gedmo:emptyType"/>
- <xs:element name="tree-root" type="gedmo:emptyType"/>
- <xs:element name="tree-parent" type="gedmo:emptyType"/>
- <xs:element name="tree-path-source" type="gedmo:emptyType"/>
- <xs:element name="tree-lock-time" type="gedmo:emptyType"/>
- <xs:element name="sortable-group" type="gedmo:emptyType"/>
- <xs:element name="sortable-position" type="gedmo:emptyType"/>
- <xs:element name="uploadable-file-mime-type" type="gedmo:emptyType"/>
- <xs:element name="uploadable-file-path" type="gedmo:emptyType"/>
- <xs:element name="uploadable-file-size" type="gedmo:emptyType"/>
- <xs:complexType name="translation">
- <xs:attribute name="entity" type="xs:string" use="optional" />
- <xs:attribute name="locale" type="xs:string" use="optional" />
- <xs:attribute name="language" type="xs:string" use="optional" />
- </xs:complexType>
- <xs:complexType name="tree">
- <xs:attribute name="type" type="gedmo:tree-type" default="nested" />
- <xs:attribute name="activate-locking" type="xs:boolean" default="false" />
- <xs:attribute name="locking-timeout" type="xs:integer" default="3" />
- </xs:complexType>
- <xs:complexType name="tree-closure">
- <xs:attribute name="class" type="xs:string" use="required" />
- </xs:complexType>
- <xs:complexType name="tree-path">
- <xs:attribute name="separator" type="xs:string" use="optional" default="|" />
- </xs:complexType>
- <xs:complexType name="loggable">
- <xs:attribute name="log-entry-class" type="xs:string" use="optional" />
- </xs:complexType>
- <xs:complexType name="slug">
- <xs:sequence>
- <xs:element name="handler" type="gedmo:handler" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="fields" type="xs:string" use="required"/>
- <xs:attribute name="unique" type="xs:boolean" use="optional" />
- <xs:attribute name="updatable" type="xs:boolean" use="optional" />
- <xs:attribute name="separator" type="xs:string" use="optional" />
- <xs:attribute name="style" type="gedmo:slug-style" use="optional" />
- <xs:attribute name="prefix" type="xs:string" use="optional" />
- <xs:attribute name="suffix" type="xs:string" use="optional" />
- </xs:complexType>
- <xs:complexType name="soft-deleteable">
- <xs:attribute name="field-name" type="xs:string" use="required" />
- </xs:complexType>
- <xs:complexType name="handler">
- <xs:sequence>
- <xs:element name="handler-option" type="gedmo:handler-option" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="class" type="xs:string" use="required"/>
- </xs:complexType>
- <xs:complexType name="handler-option">
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="value" type="xs:string" use="required"/>
- </xs:complexType>
- <xs:complexType name="timestampable">
- <xs:attribute name="on" type="gedmo:timestampable-action" use="optional" />
- <xs:attribute name="field" type="xs:string" use="optional" />
- <xs:attribute name="value" type="xs:string" use="optional" />
- </xs:complexType>
- <xs:complexType name="blameable">
- <xs:attribute name="on" type="gedmo:timestampable-action" use="optional" />
- <xs:attribute name="field" type="xs:string" use="optional" />
- <xs:attribute name="value" type="xs:string" use="optional" />
- </xs:complexType>
- <xs:complexType name="translatable">
- <xs:attribute name="fallback" type="xs:boolean" use="optional" />
- </xs:complexType>
- <xs:complexType name="emptyType">
- </xs:complexType>
- <xs:simpleType name="tree-type">
- <xs:restriction base="xs:token">
- <xs:enumeration value="nested"/>
- <xs:enumeration value="closure"/>
- <xs:enumeration value="materializedPath"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="slug-style">
- <xs:restriction base="xs:token">
- <xs:enumeration value="default"/>
- <xs:enumeration value="camel"/>
- <xs:enumeration value="upper"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="timestampable-action">
- <xs:restriction base="xs:token">
- <xs:enumeration value="create"/>
- <xs:enumeration value="update"/>
- <xs:enumeration value="change"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:complexType name="uploadable">
- <xs:attribute name="allow-overwrite" type="xs:boolean" use="optional" />
- <xs:attribute name="append-number" type="xs:boolean" use="optional" />
- <xs:attribute name="callback" type="xs:string" use="optional" />
- <xs:attribute name="path" type="xs:string" use="optional" />
- <xs:attribute name="path-method" type="xs:string" use="optional" />
- <xs:attribute name="filename-generator" type="xs:string" use="optional" />
- <xs:attribute name="max-size" type="xs:double" use="optional" default="0" />
- <xs:attribute name="allowed-types" type="xs:string" use="optional" />
- <xs:attribute name="disallowed-types" type="xs:string" use="optional" />
- </xs:complexType>
- </xs:schema>
|