123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- <?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.1.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
- -->
- <!--
- <xs:complexType name="entity-extension">
- <xs:sequence>
- <xs:element name="translation" type="gedmo:translation" minOccurs="0" maxOccurs="1" />
- <xs:element name="tree" type="gedmo:tree" minOccurs="0" maxOccurs="1" />
- <xs:element name="tree-closure" type="gedmo:tree-closure" minOccurs="0" maxOccurs="1" />
- <xs:element name="loggable" type="gedmo:loggable" minOccurs="0" maxOccurs="1" />
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="field-extension">
- <xs:sequence>
- <xs:element name="sluggable" type="gedmo:sluggable" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="slug" type="gedmo:slug" minOccurs="0" maxOccurs="1"/>
- <xs:element name="translatable" type="gedmo:emptyType" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="timestampable" type="gedmo:timestampable" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="versioned" type="gedmo:emptyType" minOccurs="0" maxOccurs="unbounded"/>
- <xs:element name="tree-left" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
- <xs:element name="tree-right" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
- <xs:element name="tree-level" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
- <xs:element name="tree-root" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="many-to-one-extension">
- <xs:sequence>
- <xs:element name="versioned" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
- <xs:element name="tree-parent" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="one-to-one-extension">
- <xs:sequence>
- <xs:element name="versioned" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
- <xs:element name="tree-parent" type="gedmo:emptyType" minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
- -->
- <!-- because of the above we have for now a root element gedmo with all choices -->
- <!-- 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"/>
- <!-- field -->
- <xs:element name="sluggable" type="gedmo:sluggable"/>
- <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"/>
- <!-- many-to-one -->
- <!-- xs:element name="versioned" type="gedmo:emptyType"/-->
- <xs:element name="tree-parent" type="gedmo:emptyType"/>
- <!-- one-to-one -->
- <!-- same as many-to-one
- <xs:element name="versioned" type="gedmo:emptyType"/>
- <xs:element name="tree-parent" 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:complexType>
- <xs:complexType name="tree-closure">
- <xs:attribute name="class" type="xs:string" use="required" />
- </xs:complexType>
- <xs:complexType name="loggable">
- <xs:attribute name="log-entry-class" type="xs:string" use="optional" />
- </xs:complexType>
- <xs:complexType name="sluggable">
- <xs:attribute name="position" type="xs:integer" use="optional" />
- <xs:attribute name="slugField" type="xs:string" use="optional" />
- </xs:complexType>
- <xs:complexType name="slug">
- <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: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: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:schema>
|