blob: 8253c8d227ce7259fd20aecfc722e89cc9a06699 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* $Revision: 5673 $
*
* Copyright (c) OSGi Alliance (2005, 2008). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<xs:schema
xmlns="http://www.osgi.org/xmlns/app/v1.0.0"
xmlns:app="http://www.osgi.org/xmlns/app/v1.0.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.osgi.org/xmlns/app/v1.0.0"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="1.0.0">
<xs:element name="descriptor" type="app:descriptorType">
<xs:annotation>
<xs:documentation>descriptor element encloses the application descriptors provided in a document</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="descriptorType">
<xs:sequence>
<xs:element name="application" type="app:applicationType" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="applicationType">
<xs:annotation>
<xs:documentation>describes the service dependencies of an application</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="reference" minOccurs="0" maxOccurs="unbounded" type="referenceType"/>
</xs:sequence>
<xs:attribute name="class" type="xs:string"/>
</xs:complexType>
<xs:complexType name="referenceType">
<xs:attribute name="name" type="xs:NMTOKEN" use="required"/>
<xs:attribute name="interface" type="xs:string" use="required"/>
<xs:attribute name="cardinality" default="1..1" use="optional" type="cardinalityType"/>
<xs:attribute name="policy" use="optional" default="static" type="policyType"/>
<xs:attribute name="target" type="xs:string" use="optional"/>
</xs:complexType>
<xs:simpleType name="cardinalityType">
<xs:restriction base="xs:string">
<xs:enumeration value="0..1"/>
<xs:enumeration value="0..n"/>
<xs:enumeration value="1..1"/>
<xs:enumeration value="1..n"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="policyType">
<xs:restriction base="xs:string">
<xs:enumeration value="static"/>
<xs:enumeration value="dynamic"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>