mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-15668 XML schema for XML db image file - credit goes to Andrei Bautu
This commit is contained in:
parent
94898738ff
commit
5bfa6da067
39
admin/dbtransfer/dbdata.xsd
Normal file
39
admin/dbtransfer/dbdata.xsd
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="moodle_database" type="databaseType" />
|
||||
<xs:complexType name="databaseType">
|
||||
<xs:sequence>
|
||||
<xs:element maxOccurs="unbounded" name="table" type="tableType" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="version" type="xs:positiveInteger" use="required" />
|
||||
<xs:attribute name="timestamp" type="xs:dateTime" use="required" />
|
||||
<xs:attribute name="comment" type="xs:string" />
|
||||
</xs:complexType>
|
||||
<xs:complexType name="tableType">
|
||||
<xs:sequence>
|
||||
<xs:element maxOccurs="unbounded" name="record" type="recordType" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="name" type="xs:NCName" use="required" />
|
||||
<xs:attribute name="schemaHash" type="xs:string" use="required" />
|
||||
</xs:complexType>
|
||||
<xs:complexType name="recordType">
|
||||
<xs:sequence>
|
||||
<xs:element maxOccurs="unbounded" name="field" type="fieldType" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="fieldType">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="name" type="xs:string" use="required" />
|
||||
<xs:attribute default="content" name="value" use="optional">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="content" />
|
||||
<xs:enumeration value="null" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
Loading…
x
Reference in New Issue
Block a user