Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xml_marshaller
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
xml_marshaller
Commits
4440e3fa
Commit
4440e3fa
authored
Oct 28, 2010
by
Nicolas Delaby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add XSD to check generated XML compliancy
parent
7e3e7540
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
158 additions
and
0 deletions
+158
-0
src/xml_marshaller/doc/xml_marshaller.xsd
src/xml_marshaller/doc/xml_marshaller.xsd
+158
-0
No files found.
src/xml_marshaller/doc/xml_marshaller.xsd
0 → 100644
View file @
4440e3fa
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
elementFormDefault=
"unqualified"
attributeFormDefault=
"unqualified"
>
<!-- SimpleType Declarations -->
<xs:simpleType
name=
"Complex"
>
<xs:annotation>
<xs:documentation>
Two float with space as separator
</xs:documentation>
</xs:annotation>
<xs:restriction
base=
"xs:string"
>
<xs:pattern
value=
"\d+\.\d*\s\d+\.\d*"
/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType
name=
"None"
>
<xs:annotation>
<xs:documentation>
Empty element
</xs:documentation>
</xs:annotation>
<xs:restriction
base=
"xs:string"
>
<xs:maxLength
value=
"0"
/>
</xs:restriction>
</xs:simpleType>
<!-- ComplexType declarations -->
<xs:complexType
name=
"Reference"
>
<xs:annotation>
<xs:documentation>
Its attribute id should refer to foreign key
</xs:documentation>
</xs:annotation>
<xs:attribute
name=
"id"
type=
"xs:string"
/>
</xs:complexType>
<xs:complexType
name=
"Object"
>
<xs:annotation>
<xs:documentation>
This element contains one tuple (__getinitargs__),
and one dictionary (__dict__).
Its attributes are id, module and class
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element
name=
"tuple"
type=
"AllTypeList"
/>
<xs:element
name=
"dictionary"
type=
"Dictionary"
/>
</xs:sequence>
<xs:attribute
name=
"id"
type=
"xs:string"
use=
"required"
/>
<xs:attribute
name=
"module"
type=
"xs:string"
use=
"required"
/>
<xs:attribute
name=
"class"
type=
"xs:string"
use=
"required"
/>
</xs:complexType>
<xs:complexType
name=
"List"
>
<xs:annotation>
<xs:documentation>
Extension of AllTypeList with id attribute
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension
base=
"AllTypeList"
>
<xs:attribute
name=
"id"
type=
"xs:string"
use=
"required"
/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType
name=
"Set"
>
<xs:annotation>
<xs:documentation>
Extension of AllTypeList with id attribute
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension
base=
"AllTypeList"
>
<xs:attribute
name=
"id"
type=
"xs:string"
use=
"required"
/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType
name=
"Dictionary"
>
<xs:annotation>
<xs:documentation>
Extension of AllTypeList with id attribute
Contains even occurences of AllTypeList
XXX can not be asserted with XSD
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension
base=
"AllTypeList"
>
<xs:attribute
name=
"id"
type=
"xs:string"
use=
"required"
/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType
name=
"Boolean"
>
<xs:annotation>
<xs:documentation>
0 or 1
</xs:documentation>
</xs:annotation>
<xs:restriction
base=
"xs:integer"
>
<xs:minInclusive
value=
"0"
/>
<xs:maxInclusive
value=
"1"
/>
</xs:restriction>
</xs:simpleType>
<xs:complexType
name=
"AllTypeList"
>
<xs:choice
minOccurs=
"0"
maxOccurs=
"unbounded"
>
<xs:element
name=
"tuple"
type=
"AllTypeList"
/>
<xs:element
name=
"list"
type=
"List"
/>
<xs:element
name=
"set"
type=
"Set"
/>
<xs:element
name=
"dictionary"
type=
"Dictionary"
/>
<xs:element
name=
"int"
type=
"xs:integer"
/>
<xs:element
name=
"float"
type=
"xs:float"
/>
<xs:element
name=
"long"
type=
"xs:double"
/>
<xs:element
name=
"complex"
type=
"Complex"
/>
<xs:element
name=
"string"
type=
"xs:string"
/>
<xs:element
name=
"unicode"
type=
"xs:string"
/>
<xs:element
name=
"object"
type=
"Object"
/>
<xs:element
name=
"reference"
type=
"Reference"
/>
<xs:element
name=
"code"
type=
"xs:string"
/>
<xs:element
name=
"none"
type=
"None"
/>
<xs:element
name=
"bool"
type=
"Boolean"
/>
</xs:choice>
</xs:complexType>
<!-- root Element -->
<xs:element
name=
"marshal"
type=
"AllTypeList"
>
<xs:annotation>
<xs:documentation>
Extension of AllTypeList.
Assert that all id attributes are unique
</xs:documentation>
</xs:annotation>
<xs:unique
name=
"attribute_id"
>
<xs:selector
xpath=
".//object|.//list|.//dictionary"
/>
<xs:field
xpath=
"@id"
/>
</xs:unique>
<xs:key
name=
"id_list"
>
<xs:selector
xpath=
".//object|.//list|.//dictionary"
/>
<xs:field
xpath=
"@id"
/>
</xs:key>
<xs:keyref
name=
"id_list_reference"
refer=
"id_list"
>
<xs:selector
xpath=
".//reference"
/>
<xs:field
xpath=
"@id"
/>
</xs:keyref>
</xs:element>
</xs:schema>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment