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