aboutsummaryrefslogtreecommitdiff
path: root/lib/cpluff/plugin.xsd
blob: 8fcf0e6f8fb67451a74c4843d12a2470605468ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
<!--
 * C-Pluff, a plug-in framework for C
 * Copyright 2007 Johannes Lehtinen
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:element name="plugin">
		<xs:complexType>
			<xs:sequence>
				<xs:element minOccurs="0" ref="backwards-compatibility"/>
            	<xs:element minOccurs="0" ref="requires"/>
            	<xs:element minOccurs="0" ref="runtime"/>
            	<xs:element minOccurs="0" maxOccurs="unbounded" ref="extension-point"/>
            	<xs:element minOccurs="0" maxOccurs="unbounded" ref="extension"/>
            </xs:sequence>
			<xs:attribute name="id" type="xs:string" use="required"/>
			<xs:attribute name="name" type="xs:string"/>
			<xs:attribute name="version" type="xs:string"/>
			<xs:attribute name="provider-name" type="xs:string"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="backwards-compatibility">
		<xs:complexType>
			<xs:attribute name="abi" type="xs:string"/>
			<xs:attribute name="api" type="xs:string"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="requires">
		<xs:complexType>
			<xs:sequence>
				<xs:element minOccurs="0" ref="c-pluff"/>
				<xs:element minOccurs="0" maxOccurs="unbounded" ref="import"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="c-pluff">
		<xs:complexType>
			<xs:attribute name="version" type="xs:string" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="import">
		<xs:complexType>
			<xs:attribute name="plugin" type="xs:string" use="required"/>
			<xs:attribute name="version" type="xs:integer"/>
			<xs:attribute name="optional" type="xs:boolean" default="false"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="runtime">
		<xs:complexType>
			<xs:attribute name="library" type="xs:string" use="required"/>
			<xs:attribute name="funcs" type="xs:string"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="extension-point">
		<xs:complexType>
			<xs:attribute name="id" type="simpleIdentifier" use="required"/>
			<xs:attribute name="name" type="xs:string"/>
			<xs:attribute name="schema" type="xs:string"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="extension">
		<xs:complexType>
			<xs:sequence>
				<xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
			</xs:sequence>
			<xs:attribute name="point" type="xs:string" use="required"/>
			<xs:attribute name="id" type="simpleIdentifier"/>
			<xs:attribute name="name" type="xs:string"/>
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="simpleIdentifier">
		<xs:restriction base="xs:string">
			<xs:pattern value="[^.]+"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>