blob: e535370531ef6fc173a2582de784bfa77894d4e4 [file] [log] [blame]
Christian van Spaandonk63814412008-08-02 09:56:01 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3/*
4 * $Header: /cvshome/build/xmlns/app/app.xsd,v 1.2 2006/03/29 15:40:11 hargrave Exp $
5 *
6 * Copyright (c) OSGi Alliance (2005, 2006). All Rights Reserved.
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20-->
21<xs:schema
22 xmlns="http://www.osgi.org/xmlns/app/v1.0.0"
23 xmlns:app="http://www.osgi.org/xmlns/app/v1.0.0"
24 xmlns:xs="http://www.w3.org/2001/XMLSchema"
25 targetNamespace="http://www.osgi.org/xmlns/app/v1.0.0"
26 elementFormDefault="qualified"
27 attributeFormDefault="unqualified"
28 version="1.0.0">
29
30 <xs:element name="descriptor" type="app:descriptorType">
31 <xs:annotation>
32 <xs:documentation>descriptor element encloses the applicaiton descriptors provided in a document</xs:documentation>
33 </xs:annotation>
34 </xs:element>
35
36 <xs:complexType name="descriptorType">
37 <xs:sequence>
38 <xs:element name="application" type="app:applicationType" minOccurs="1" maxOccurs="unbounded"/>
39 </xs:sequence>
40 </xs:complexType>
41
42 <xs:complexType name="applicationType">
43 <xs:annotation>
44 <xs:documentation>describes the service dependecies of an application</xs:documentation>
45 </xs:annotation>
46 <xs:sequence>
47 <xs:element name="reference" minOccurs="0" maxOccurs="unbounded" type="referenceType"/>
48 </xs:sequence>
49 <xs:attribute name="class" type="xs:string"/>
50 </xs:complexType>
51
52 <xs:complexType name="referenceType">
53 <xs:attribute name="name" type="xs:NMTOKEN" use="required"/>
54 <xs:attribute name="interface" type="xs:string" use="required"/>
55 <xs:attribute name="cardinality" default="1..1" use="optional" type="cardinalityType"/>
56 <xs:attribute name="policy" use="optional" default="static" type="policyType"/>
57 <xs:attribute name="target" type="xs:string" use="optional"/>
58 </xs:complexType>
59
60 <xs:simpleType name="cardinalityType">
61 <xs:restriction base="xs:string">
62 <xs:enumeration value="0..1"/>
63 <xs:enumeration value="0..n"/>
64 <xs:enumeration value="1..1"/>
65 <xs:enumeration value="1..n"/>
66 </xs:restriction>
67 </xs:simpleType>
68
69 <xs:simpleType name="policyType">
70 <xs:restriction base="xs:string">
71 <xs:enumeration value="static"/>
72 <xs:enumeration value="dynamic"/>
73 </xs:restriction>
74 </xs:simpleType>
75
76
77</xs:schema>