You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2008/09/09 16:21:19 UTC

svn commit: r693468 [1/2] - in /felix/trunk/ipojo: arch/src/main/resources/ composite/src/main/resources/ core/src/main/resources/ examples/junit4osgi/junit4osgi/ handler/eventadmin/src/main/resources/ handler/extender/src/main/resources/ handler/jmx/s...

Author: clement
Date: Tue Sep  9 07:21:15 2008
New Revision: 693468

URL: http://svn.apache.org/viewvc?rev=693468&view=rev
Log:
Fix issue Felix-716

Provides XML-Schemas for core features (core handler, component, handler, instance), compositions, external handlers.
Modifies the manipulator in order to check schema when specified in the XML descriptor.
Tests suites now use schemas.

Added:
    felix/trunk/ipojo/composite/src/main/resources/composite.xsd
    felix/trunk/ipojo/core/src/main/resources/core.xsd
    felix/trunk/ipojo/handler/eventadmin/src/main/resources/event-admin.xsd
    felix/trunk/ipojo/handler/extender/src/main/resources/extender-pattern.xsd
    felix/trunk/ipojo/handler/jmx/src/main/resources/jmx.xsd
    felix/trunk/ipojo/handler/temporal/src/main/resources/temporal.xsd
    felix/trunk/ipojo/handler/whiteboard/src/main/resources/whiteboard-pattern.xsd
Modified:
    felix/trunk/ipojo/arch/src/main/resources/metadata.xml
    felix/trunk/ipojo/core/src/main/resources/metadata.xml
    felix/trunk/ipojo/examples/junit4osgi/junit4osgi/metadata.xml
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java
    felix/trunk/ipojo/tests/composite/composite-runtime/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/composite/import-export/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/composite/service-instance/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/composite/service-providing/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/core/configuration/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/core/external-handlers/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/core/factories/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/core/lifecycle-callback/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/core/lifecycle-controller/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/core/service-dependency-bindingpolicy/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/core/service-dependency-filter/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/core/service-dependency/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/core/service-providing/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/handler/eventadmin/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/handler/temporal/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/handler/whiteboard/src/main/resources/metadata.xml
    felix/trunk/ipojo/tests/manipulator/manipulation/src/main/resources/metadata.xml

Modified: felix/trunk/ipojo/arch/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/arch/src/main/resources/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/arch/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/arch/src/main/resources/metadata.xml Tue Sep  9 07:21:15 2008
@@ -17,14 +17,14 @@
 	specific language governing permissions and limitations
 	under the License.
 -->
-<iPOJO>
-	<Component className="org.apache.felix.ipojo.arch.ArchCommandImpl"
-		factory="false">
+<ipojo>
+	<component classname="org.apache.felix.ipojo.arch.ArchCommandImpl"
+		public="false">
 		<Provides />
-		<Requires field="m_archs" optional="true" />
-		<Requires field="m_factories" optional="true"/>
-		<Requires field="m_handlers" optional="true"/>
-	</Component>
+		<requires field="m_archs" optional="true" />
+		<requires field="m_factories" optional="true"/>
+		<requires field="m_handlers" optional="true"/>
+	</component>
 	<instance component="org.apache.felix.ipojo.arch.ArchCommandImpl"
 		name="ArchCommand" />
-</iPOJO>
\ No newline at end of file
+</ipojo>
\ No newline at end of file

Added: felix/trunk/ipojo/composite/src/main/resources/composite.xsd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/composite/src/main/resources/composite.xsd?rev=693468&view=auto
==============================================================================
--- felix/trunk/ipojo/composite/src/main/resources/composite.xsd (added)
+++ felix/trunk/ipojo/composite/src/main/resources/composite.xsd Tue Sep  9 07:21:15 2008
@@ -0,0 +1,130 @@
+<?xml version="1.0"?>
+<xs:schema elementFormDefault="qualified"
+	targetNamespace="org.apache.felix.ipojo.composite"
+	xmlns="org.apache.felix.ipojo.composite"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ipojo="org.apache.felix.ipojo">
+
+	<xs:import namespace="org.apache.felix.ipojo" schemaLocation="http://people.apache.org/~clement/ipojo/schemas/core.xsd"></xs:import>
+	<xs:complexType name="CompositeType">
+		<xs:choice minOccurs="0" maxOccurs="unbounded">
+			<xs:element ref="subservice" minOccurs="0"
+				maxOccurs="unbounded">
+			</xs:element>
+			<xs:element ref="provides" minOccurs="0"
+				maxOccurs="unbounded">
+			</xs:element>
+			<xs:element ref="instance" minOccurs="0"
+				maxOccurs="unbounded">
+			</xs:element>
+			<xs:any namespace="##other" processContents="lax"
+				minOccurs="0" maxOccurs="unbounded">
+			</xs:any>
+		</xs:choice>
+		<xs:attribute name="name" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="public" type="xs:boolean" use="optional"></xs:attribute>
+		<xs:attribute name="architecture" type="xs:boolean"
+			use="optional">
+		</xs:attribute>
+	</xs:complexType>
+
+	<xs:element name="subservice" type="SubserviceType" />
+	<xs:element name="provides" type="CompositeProvidesType" />
+	
+	<xs:complexType name="CompositeProvidesType">
+		<xs:complexContent>
+			<xs:extension base="ipojo:ServiceDependencyType">
+				<xs:sequence>
+					<xs:element name="delegation" type="DelegationType"></xs:element>
+				</xs:sequence>
+				<xs:attribute name="specification" type="xs:string"
+					use="required">
+				</xs:attribute>
+
+				<xs:attribute name="action">
+					<xs:simpleType>
+						<xs:restriction base="xs:string">
+							<xs:enumeration value="implement"></xs:enumeration>
+							<xs:enumeration value="export"></xs:enumeration>
+						</xs:restriction>
+					</xs:simpleType>
+				</xs:attribute>
+
+
+
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+
+	<xs:complexType name="SubserviceType">
+		<xs:complexContent>
+			<xs:extension base="ipojo:ServiceDependencyType">
+
+				<xs:sequence minOccurs="0" maxOccurs="unbounded">
+					<xs:element name="property" type="CompositePropertyType"></xs:element>
+				</xs:sequence>
+				<xs:attribute name="action" use="required">
+					<xs:simpleType>
+						<xs:restriction base="xs:string">
+							<xs:enumeration value="import"></xs:enumeration>
+							<xs:enumeration value="instantiate"></xs:enumeration>
+						</xs:restriction>
+					</xs:simpleType>
+				</xs:attribute>
+
+				<xs:attribute name="specification" type="xs:string"
+					use="required">
+				</xs:attribute>
+				<xs:attribute name="context-source" type="xs:string"
+					use="optional">
+				</xs:attribute>
+				<xs:attribute name="scope">
+					<xs:simpleType>
+						<xs:restriction base="xs:string">
+							<xs:enumeration value="global"></xs:enumeration>
+							<xs:enumeration value="composite"></xs:enumeration>
+							<xs:enumeration value="composite+global"></xs:enumeration>
+						</xs:restriction>
+					</xs:simpleType>
+				</xs:attribute>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+
+	<xs:simpleType name="actionType">
+		<xs:restriction base="xs:string"></xs:restriction>
+	</xs:simpleType>
+
+	<xs:complexType name="CompositePropertyType">
+		<xs:sequence minOccurs="0" maxOccurs="unbounded">
+			<xs:element name="property" type="CompositePropertyType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+		</xs:sequence>
+		<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
+		<xs:attribute name="value" type="xs:string" use="optional"></xs:attribute>
+	</xs:complexType>
+
+	<xs:complexType name="CompositeInstanceType">
+		<xs:sequence minOccurs="0" maxOccurs="unbounded">
+			<xs:element name="property" type="CompositePropertyType"></xs:element>
+		</xs:sequence>
+		<xs:attribute name="name" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="component" type="xs:string"
+			use="required">
+		</xs:attribute>
+	</xs:complexType>
+
+    <xs:element name="instance" type="CompositeInstanceType"></xs:element>
+
+    <xs:element name="composite" type="CompositeType"></xs:element>
+
+    <xs:complexType name="DelegationType">
+    	<xs:attribute name="method" type="xs:string" use="required"></xs:attribute>
+    	<xs:attribute name="policy" use="required">
+    		<xs:simpleType>
+    			<xs:restriction base="xs:string">
+    				<xs:enumeration value="all"></xs:enumeration>
+    				<xs:enumeration value="one"></xs:enumeration>
+    			</xs:restriction>
+    		</xs:simpleType>
+    	</xs:attribute>
+    </xs:complexType>
+</xs:schema>
\ No newline at end of file

Added: felix/trunk/ipojo/core/src/main/resources/core.xsd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/resources/core.xsd?rev=693468&view=auto
==============================================================================
--- felix/trunk/ipojo/core/src/main/resources/core.xsd (added)
+++ felix/trunk/ipojo/core/src/main/resources/core.xsd Tue Sep  9 07:21:15 2008
@@ -0,0 +1,275 @@
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements.  See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership.  The ASF licenses this file
+	to you 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 elementFormDefault="qualified" targetNamespace="org.apache.felix.ipojo"
+	xmlns="org.apache.felix.ipojo" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    <xs:annotation>
+    	<xs:documentation>iPOJO Core XML-Schema.
This grammars models iPOJO descriptor using core features. It provides several extensibility mechanism in order to compose this schema with external handlers and other component implementation type such as compositions.</xs:documentation></xs:annotation>
+    <xs:element name="ipojo">
+		<xs:complexType>
+			<xs:choice minOccurs="0" maxOccurs="unbounded">
+				<xs:element ref="handler" minOccurs="0" maxOccurs="unbounded">
+				</xs:element>
+				<xs:element ref="instance" minOccurs="0" maxOccurs="unbounded">
+				</xs:element>
+				<xs:element ref="component" minOccurs="0" maxOccurs="unbounded">
+				</xs:element>
+				<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+				</xs:any>
+			</xs:choice>
+		</xs:complexType>
+	</xs:element>
+	<xs:complexType name="HandlerType">
+		<xs:complexContent>
+			<xs:extension base="RootElementType">
+				<xs:sequence maxOccurs="unbounded" minOccurs="0">
+					<xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any"
+						processContents="skip">
+					</xs:any>
+				</xs:sequence>
+				<xs:attribute name="classname" type="xs:string" use="required">
+				</xs:attribute>
+				<xs:attribute name="name" type="xs:string" use="required">
+				</xs:attribute>
+				<xs:attribute name="namespace" type="xs:string" use="optional">
+				</xs:attribute>
+				<xs:attribute name="architecture" type="xs:boolean"
+					use="optional" fixed="false">
+				</xs:attribute>
+				<xs:attribute name="level" type="xs:int" use="optional">
+				</xs:attribute>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<xs:complexType name="InstanceType">
+		<xs:complexContent>
+			<xs:extension base="RootElementType">
+				<xs:sequence minOccurs="0" maxOccurs="unbounded">
+					<xs:element name="property" type="InstancePropertyType"></xs:element>
+				</xs:sequence>
+				<xs:attribute name="component" type="xs:string"></xs:attribute>
+				<xs:attribute name="name" type="xs:string" use="optional">
+				</xs:attribute>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<xs:complexType name="InstancePropertyType">
+		<xs:sequence>
+			<xs:element name="property" type="InstancePropertyType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+		</xs:sequence>
+		<xs:attribute name="name" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="value" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="type" type="xs:string" use="optional"></xs:attribute>
+	</xs:complexType>
+	<xs:complexType name="RootElementType"></xs:complexType>
+	<xs:complexType name="ComponentType">
+		<xs:annotation>
+			<xs:documentation>
+				Declares an atomic (i.e. primitive) component type
+			</xs:documentation>
+		</xs:annotation>
+		<xs:choice minOccurs="0" maxOccurs="unbounded">
+			<xs:element ref="callback" minOccurs="0"
+				maxOccurs="unbounded">
+			</xs:element>
+			<xs:element ref="provides" minOccurs="0"
+				maxOccurs="unbounded">
+			</xs:element>
+			<xs:element ref="requires" minOccurs="0"
+				maxOccurs="unbounded">
+			</xs:element>
+			<xs:element ref="properties" minOccurs="0"
+				maxOccurs="unbounded">
+			</xs:element>
+			<xs:element ref="controller" minOccurs="0" maxOccurs="1"></xs:element>
+			<xs:any namespace="##other" processContents="lax"
+				minOccurs="0" maxOccurs="unbounded">
+			</xs:any>
+		</xs:choice>
+		<xs:attribute name="name" type="xs:string" use="optional">
+			<xs:annotation>
+				<xs:documentation>
+					Specifies the name of the component type. This name
+					is used to identify the factory attached to this
+					type. If not specified, the factory name is the
+					implementation class name.
+				</xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="public" type="xs:boolean" use="optional">
+			<xs:annotation>
+				<xs:documentation>
+					Determines if the component type is public or
+					private. A public factory (default) can be used from
+					any bundles.
+				</xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="classname" type="xs:string"
+			use="required">
+			<xs:annotation>
+				<xs:documentation>
+					Specifies the implementation class of the component
+					type.
+				</xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="architecture" type="xs:boolean"
+			use="optional">
+			<xs:annotation>
+				<xs:documentation>
+					Enable or disable the architecture exposition. By
+					default, the architecture is exposed. This allows
+					instance introspection.
+				</xs:documentation>
+			</xs:annotation>
+		</xs:attribute>
+		<xs:attribute name="immediate" type="xs:boolean"
+			use="optional">
+		</xs:attribute>
+		<xs:attribute name="factory-method" type="xs:string" use="optional"></xs:attribute>
+	</xs:complexType>
+	<xs:complexType name="RequiresType">
+		<xs:complexContent>
+			<xs:extension base="ServiceDependencyType">
+				<xs:sequence minOccurs="0" maxOccurs="unbounded">
+					<xs:element name="callback"
+						type="DependencyCallbackType">
+					</xs:element>
+				</xs:sequence>
+				
+				<xs:attribute name="interface" type="xs:string"
+				    use="optional">
+				</xs:attribute>
+
+				<xs:attribute name="field" type="xs:string"
+					use="optional">
+				</xs:attribute>
+
+				<xs:attribute name="nullable" type="xs:boolean"
+					use="optional">
+				</xs:attribute>
+
+				<xs:attribute name="default-implementation"
+					type="xs:string" use="optional">
+				</xs:attribute>
+
+				<xs:attribute name="from" type="xs:string"
+					use="optional">
+				</xs:attribute>
+				
+				<xs:attribute name="scope" use="optional">
+					<xs:simpleType>
+						<xs:restriction base="xs:string">
+							<xs:enumeration value="global"></xs:enumeration>
+							<xs:enumeration value="composite"></xs:enumeration>
+							<xs:enumeration value="composite+global"></xs:enumeration>
+						</xs:restriction>
+					</xs:simpleType>
+				</xs:attribute>
+
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	<xs:complexType name="DependencyCallbackType">
+		<xs:attribute name="method" type="xs:string" use="required"></xs:attribute>
+		<xs:attribute name="type" use="required">
+			<xs:simpleType>
+				<xs:restriction base="xs:string">
+					<xs:enumeration value="bind"></xs:enumeration>
+					<xs:enumeration value="unbind"></xs:enumeration>
+				</xs:restriction>
+			</xs:simpleType>
+		</xs:attribute>
+	</xs:complexType>
+	<xs:complexType name="CallbackType">
+        <xs:annotation>
+        	<xs:documentation>Lifecycle Callback.
Allows a POJO to be notified when the instance becomes valid or invalid.</xs:documentation>
+        </xs:annotation>
+        <xs:attribute name="method" type="xs:string" use="required">
+        	<xs:annotation>
+        		<xs:documentation>Specifies the method to call on the transition</xs:documentation>
+        	</xs:annotation></xs:attribute>
+		<xs:attribute name="transition" use="required">
+            <xs:annotation>
+            	<xs:documentation>Specifies the transition when the callback needs to be invoked.</xs:documentation>
+            </xs:annotation>
+            <xs:simpleType>
+				<xs:restriction base="xs:string">
+					<xs:enumeration value="validate"></xs:enumeration>
+					<xs:enumeration value="invalidate"></xs:enumeration>
+				</xs:restriction>
+			</xs:simpleType>
+		</xs:attribute>
+	</xs:complexType>
+	<xs:element name="provides" type="ProvidesType" id="provides"></xs:element>
+	<xs:complexType name="ProvidesType">
+		<xs:sequence minOccurs="0" maxOccurs="unbounded">
+			<xs:element name="property" type="PropertyType"></xs:element>
+		</xs:sequence>
+		<xs:attribute name="interface" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="factory" type="xs:string" use="optional"></xs:attribute>
+	</xs:complexType>
+	<xs:complexType name="PropertyType">
+		<xs:attribute name="field" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="method" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="name" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="value" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="type" type="xs:string" use="optional"></xs:attribute>
+	</xs:complexType>
+	<xs:element name="callback" type="CallbackType" id="callback"></xs:element>
+	<xs:element name="controller" type="ControllerType" id="controller"></xs:element>
+	<xs:element name="requires" type="RequiresType" id="requires"></xs:element>
+	<xs:element name="component" type="ComponentType" id="component"></xs:element>
+	<xs:element name="handler" type="HandlerType" id="handler"></xs:element>
+	<xs:element name="instance" type="InstanceType" id="instance"></xs:element>
+
+    <xs:element name="properties" type="PropertiesType" id="properties"></xs:element>
+	<xs:complexType name="PropertiesType">
+		<xs:sequence minOccurs="0" maxOccurs="unbounded">
+			<xs:element name="property" type="PropertyType"></xs:element>
+		</xs:sequence>
+		<xs:attribute name="propagation" type="xs:boolean" use="optional"></xs:attribute>
+		<xs:attribute name="pid" type="xs:string" use="optional"></xs:attribute>
+	</xs:complexType>
+	
+	<xs:complexType name="ServiceDependencyType">
+		<xs:attribute name="optional" type="xs:boolean" use="optional">
+		</xs:attribute>
+		<xs:attribute name="aggregate" type="xs:boolean" use="optional">
+		</xs:attribute>
+		<xs:attribute name="policy" use="optional">
+			<xs:simpleType>
+				<xs:restriction base="xs:string">
+					<xs:enumeration value="dynamic"></xs:enumeration>
+					<xs:enumeration value="static"></xs:enumeration>
+					<xs:enumeration value="dynamic-priority"></xs:enumeration>
+				</xs:restriction>
+			</xs:simpleType>
+		</xs:attribute>
+		<xs:attribute name="comparator" type="xs:string" use="optional">
+		</xs:attribute>
+		<xs:attribute name="filter" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="id" type="xs:string" use="optional"></xs:attribute>
+	</xs:complexType>
+
+    <xs:complexType name="ControllerType">
+    	<xs:attribute name="field" type="xs:string" use="required">
+		</xs:attribute>
+    </xs:complexType>
+</xs:schema>
\ No newline at end of file

Modified: felix/trunk/ipojo/core/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/resources/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/core/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/core/src/main/resources/metadata.xml Tue Sep  9 07:21:15 2008
@@ -16,11 +16,13 @@
 	specific language governing permissions and limitations
 	under the License.
 -->
-<ipojo>
+<ipojo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/schemas/core.xsd" 
+    xmlns="org.apache.felix.ipojo">
 	<!-- Primitives handler -->
 	<handler
 		classname="org.apache.felix.ipojo.handlers.lifecycle.controller.ControllerHandler"
-		name="controller" architecture="false" />
+		name="controller" architecture="false"/>
 	<handler
 		classname="org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler"
 		name="callback" level="1" architecture="false" />

Modified: felix/trunk/ipojo/examples/junit4osgi/junit4osgi/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/examples/junit4osgi/junit4osgi/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/examples/junit4osgi/junit4osgi/metadata.xml (original)
+++ felix/trunk/ipojo/examples/junit4osgi/junit4osgi/metadata.xml Tue Sep  9 07:21:15 2008
@@ -1,13 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<iPOJO xmlns:extender="org.apache.felix.ipojo.extender">
-	<Component
-		className="org.apache.felix.ipojo.junit4osgi.impl.JunitExtender">
+<ipojo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/schemas/core.xsd 
+	    org.apache.felix.ipojo.extender http://people.apache.org/~clement/ipojo/schemas/extender-pattern.xsd"
+	xmlns="org.apache.felix.ipojo"
+	xmlns:extender="org.apache.felix.ipojo.extender">
+	<component
+		classname="org.apache.felix.ipojo.junit4osgi.impl.JunitExtender">
 		<extender:extender extension="Test-Suite"
 			onArrival="onBundleArrival" onDeparture="onBundleDeparture" />
 		<callback transition="invalidate" method="stopping" />
 		<callback transition="validate" method="starting" />
 		<provides />
-	</Component>
+	</component>
 	<instance
 		component="org.apache.felix.ipojo.junit4osgi.impl.JunitExtender" />
-</iPOJO>
\ No newline at end of file
+</ipojo>
\ No newline at end of file

Added: felix/trunk/ipojo/handler/eventadmin/src/main/resources/event-admin.xsd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/eventadmin/src/main/resources/event-admin.xsd?rev=693468&view=auto
==============================================================================
--- felix/trunk/ipojo/handler/eventadmin/src/main/resources/event-admin.xsd (added)
+++ felix/trunk/ipojo/handler/eventadmin/src/main/resources/event-admin.xsd Tue Sep  9 07:21:15 2008
@@ -0,0 +1,44 @@
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements.  See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership.  The ASF licenses this file
+	to you 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 targetNamespace="org.apache.felix.ipojo.handlers.event.EventAdminHandler"
+	xmlns="org.apache.felix.ipojo.handlers.event.EventAdminHandler"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	elementFormDefault="qualified">	
+
+    <xs:complexType name="PublisherType">
+    	<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
+    	<xs:attribute name="field" type="xs:string" use="required"></xs:attribute>
+    	<xs:attribute name="topics" type="xs:string" use="optional"></xs:attribute>
+    	<xs:attribute name="synchronous" type="xs:boolean" use="optional"></xs:attribute>
+    	<xs:attribute name="data-key" type="xs:string" use="optional"></xs:attribute>
+    </xs:complexType>
+    
+    <xs:complexType name="SubscriberType">
+    	<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
+    	<xs:attribute name="callback" type="xs:string" use="required"></xs:attribute>
+    	<xs:attribute name="topics" type="xs:string" use="optional"></xs:attribute>
+    	<xs:attribute name="filter" type="xs:string" use="optional"></xs:attribute>
+    	<xs:attribute name="data-key" type="xs:string" use="optional"></xs:attribute>
+    	<xs:attribute name="data-type" type="xs:string" use="optional"></xs:attribute>
+    </xs:complexType>
+    
+    <xs:element name="publisher" type="PublisherType"></xs:element>
+    <xs:element name="subscriber" type="SubscriberType"></xs:element>
+    
+</xs:schema>
\ No newline at end of file

Added: felix/trunk/ipojo/handler/extender/src/main/resources/extender-pattern.xsd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/extender/src/main/resources/extender-pattern.xsd?rev=693468&view=auto
==============================================================================
--- felix/trunk/ipojo/handler/extender/src/main/resources/extender-pattern.xsd (added)
+++ felix/trunk/ipojo/handler/extender/src/main/resources/extender-pattern.xsd Tue Sep  9 07:21:15 2008
@@ -0,0 +1,29 @@
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements.  See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership.  The ASF licenses this file
+	to you 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 targetNamespace="org.apache.felix.ipojo.extender"
+	xmlns="org.apache.felix.ipojo.extender"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	elementFormDefault="qualified">
+	<xs:element name="extender" type="ExtenderType"></xs:element>
+	<xs:complexType name="ExtenderType">
+		<xs:attribute name="onArrival" type="xs:string" use="required"></xs:attribute>
+		<xs:attribute name="onDeparture" type="xs:string" use="required"></xs:attribute>
+		<xs:attribute name="extension" type="xs:string" use="required"></xs:attribute>
+	</xs:complexType>	
+</xs:schema>
\ No newline at end of file

Added: felix/trunk/ipojo/handler/jmx/src/main/resources/jmx.xsd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/jmx/src/main/resources/jmx.xsd?rev=693468&view=auto
==============================================================================
--- felix/trunk/ipojo/handler/jmx/src/main/resources/jmx.xsd (added)
+++ felix/trunk/ipojo/handler/jmx/src/main/resources/jmx.xsd Tue Sep  9 07:21:15 2008
@@ -0,0 +1,60 @@
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements.  See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership.  The ASF licenses this file
+	to you 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 targetNamespace="org.apache.felix.ipojo.handlers.jmx"
+	xmlns="org.apache.felix.ipojo.handlers.jmx"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	elementFormDefault="qualified">
+	<xs:element name="config" type="JMXType"></xs:element>
+
+	<xs:complexType name="JMXType">
+
+		<xs:choice minOccurs="0" maxOccurs="unbounded">
+			<xs:element name="method" type="JMXMethod"></xs:element>
+			<xs:element name="property" type="JMXProperty"></xs:element>
+		</xs:choice>
+		<xs:attribute name="usesMOSGi" type="xs:boolean"
+			use="optional">
+		</xs:attribute>
+		<xs:attribute name="objectName" type="xs:string"
+			use="optional">
+		</xs:attribute>
+		<xs:attribute name="domain" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="name" type="xs:string" use="optional"></xs:attribute>
+
+	</xs:complexType>
+
+	<xs:complexType name="JMXProperty">
+		<xs:attribute name="field" type="xs:string" use="required"></xs:attribute>
+		<xs:attribute name="name" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="rights" use="optional">
+			<xs:simpleType>
+				<xs:restriction base="xs:string">
+					<xs:enumeration value="r"></xs:enumeration>
+					<xs:enumeration value="w"></xs:enumeration>
+				</xs:restriction>
+			</xs:simpleType>
+		</xs:attribute>
+		<xs:attribute name="notification" type="xs:boolean" use="optional"></xs:attribute>
+	</xs:complexType>
+
+	<xs:complexType name="JMXMethod">
+		<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
+		<xs:attribute name="description" type="xs:string" use="optional"></xs:attribute>
+	</xs:complexType>
+</xs:schema>
\ No newline at end of file

Added: felix/trunk/ipojo/handler/temporal/src/main/resources/temporal.xsd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/temporal/src/main/resources/temporal.xsd?rev=693468&view=auto
==============================================================================
--- felix/trunk/ipojo/handler/temporal/src/main/resources/temporal.xsd (added)
+++ felix/trunk/ipojo/handler/temporal/src/main/resources/temporal.xsd Tue Sep  9 07:21:15 2008
@@ -0,0 +1,39 @@
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements.  See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership.  The ASF licenses this file
+	to you 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 targetNamespace="org.apache.felix.ipojo.handler.temporal"
+	xmlns="org.apache.felix.ipojo.handler.temporal"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	elementFormDefault="qualified">
+	<xs:element name="requires" type="TemporalServiceDependencyType"></xs:element>
+
+	<xs:complexType name="TemporalServiceDependencyType">
+
+		<xs:attribute name="field" type="xs:string" use="required"></xs:attribute>
+		<xs:attribute name="filter" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="timeout" type="xs:int" use="optional">
+			<xs:annotation>
+				<xs:documentation>Specifies the timeout after which the onTimeout policy is executed.
The value is the time in ms to wait. -1 is used to indicate an infinite wait. </xs:documentation>
+			</xs:annotation></xs:attribute>
+		<xs:attribute name="onTimeout" use="optional" type="xs:string">
+            <xs:annotation>
+            	<xs:documentation>Specifies the onTimeout policy. This determines the object to inject when the service stills unavailable when the timeout expires.
Several values are supported:
- 'nullable' means that a Nullable object will be injected
- 'empty-array' injects an empty array (only for aggregate dependency)
- 'null' injects Null
- any other value are interpreted as the default implementation class to use.

If the onTimetout attribute is not specified, a RuntimeException is thrown when the timeout is reached.</xs:documentation>
+            </xs:annotation>
+		</xs:attribute>
+	</xs:complexType>
+</xs:schema>
\ No newline at end of file

Added: felix/trunk/ipojo/handler/whiteboard/src/main/resources/whiteboard-pattern.xsd
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/whiteboard/src/main/resources/whiteboard-pattern.xsd?rev=693468&view=auto
==============================================================================
--- felix/trunk/ipojo/handler/whiteboard/src/main/resources/whiteboard-pattern.xsd (added)
+++ felix/trunk/ipojo/handler/whiteboard/src/main/resources/whiteboard-pattern.xsd Tue Sep  9 07:21:15 2008
@@ -0,0 +1,30 @@
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements.  See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership.  The ASF licenses this file
+	to you 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 targetNamespace="org.apache.felix.ipojo.white-board-pattern"
+	xmlns="org.apache.felix.ipojo.white-board-pattern"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	elementFormDefault="qualified">
+	<xs:element name="wbp" type="WBPType"></xs:element>
+	<xs:complexType name="WBPType">
+		<xs:attribute name="onArrival" type="xs:string" use="required"></xs:attribute>
+		<xs:attribute name="onDeparture" type="xs:string" use="required"></xs:attribute>
+		<xs:attribute name="onModification" type="xs:string" use="optional"></xs:attribute>
+		<xs:attribute name="filter" type="xs:string" use="required"></xs:attribute>
+	</xs:complexType>	
+</xs:schema>
\ No newline at end of file

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java (original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java Tue Sep  9 07:21:15 2008
@@ -49,8 +49,11 @@
 import org.objectweb.asm.ClassReader;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
 import org.xml.sax.XMLReader;
 
+import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator;
+
 /**
  * Pojoization allows creating an iPOJO bundle from a "normal" bundle.  
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
@@ -655,6 +658,13 @@
             XMLReader parser = (XMLReader) Class.forName("org.apache.xerces.parsers.SAXParser").newInstance();
             XMLMetadataParser handler = new XMLMetadataParser();
             parser.setContentHandler(handler);
+            parser.setFeature("http://xml.org/sax/features/validation",
+                    true); 
+            parser.setFeature("http://apache.org/xml/features/validation/schema", 
+                    true);
+           
+            parser.setErrorHandler(handler);
+            
             InputSource is = new InputSource(stream);
             parser.parse(is);
             meta = handler.getMetadata();
@@ -669,6 +679,9 @@
         } catch (ParseException e) {
             error("Parsing Error when parsing the XML file " + path + " : " + e.getMessage());
             return null;
+        } catch (SAXParseException e) {
+            error("Error during metadata parsing at line " + e.getLineNumber() + " : " + e.getMessage());
+            return null;
         } catch (SAXException e) {
             error("Parsing Error when parsing (Sax Error) the XML file " + path + " : " + e.getMessage());
             return null;

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java (original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java Tue Sep  9 07:21:15 2008
@@ -22,15 +22,17 @@
 import org.apache.felix.ipojo.metadata.Element;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
+import org.xml.sax.ErrorHandler;
 import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
 
 /**
  * XML Metadata parser.
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class XMLMetadataParser implements ContentHandler {
+public class XMLMetadataParser implements ContentHandler, ErrorHandler {
 
     /**
      * Element of the metadata.
@@ -83,11 +85,6 @@
         // Get the last element of the list
         Element lastElement = removeLastElement();
 
-        // Check if the name is consistent with the name of this end tag
-        if (!lastElement.getName().equalsIgnoreCase(qName) && !lastElement.getNameSpace().equalsIgnoreCase(namespaceURI)) {
-            throw new SAXException("Parse error when ending an element : " + qName + " [" + namespaceURI + "]");
-        }
-
         // The name is consistent
         // Add this element last element with if it is not the root
         if (m_elements.length != 0) {
@@ -174,7 +171,13 @@
      * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
      */
     public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
-        Element elem = new Element(localName, namespaceURI);
+        String namespace = namespaceURI;
+        if (namespaceURI != null
+                && (namespaceURI.equalsIgnoreCase("org.apache.felix.ipojo") || namespaceURI.equalsIgnoreCase("org.apache.felix.ipojo.composite"))) {
+            namespace = null; // Remove the 'org.apache.felix.ipojo' namespace
+        }
+        
+        Element elem = new Element(localName, namespace);
         for (int i = 0; i < atts.getLength(); i++) {
             String name = (String) atts.getLocalName(i);
             String ns = (String) atts.getURI(i);
@@ -241,4 +244,26 @@
         }
         return last;
     }
+
+
+    public void error(SAXParseException saxparseexception) throws SAXException {
+        if (saxparseexception.getMessage().contains("cvc-elt.1")) {
+            return; // Do not throw an exception when no schema defined.
+        }
+        throw saxparseexception;
+    }
+
+
+    public void fatalError(SAXParseException saxparseexception)
+            throws SAXException {
+        System.err.println("Fatal error during XML-Schema parsing : " + saxparseexception);
+        throw saxparseexception;
+    }
+
+
+    public void warning(SAXParseException saxparseexception)
+            throws SAXException {
+        System.err.println("Warning : an error was detected in the metadata file : " + saxparseexception);
+        
+    }
 }

Modified: felix/trunk/ipojo/tests/composite/composite-runtime/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/composite/composite-runtime/src/main/resources/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/composite/composite-runtime/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/composite/composite-runtime/src/main/resources/metadata.xml Tue Sep  9 07:21:15 2008
@@ -1,12 +1,18 @@
-<ipojo xmlns:cs="org.apache.felix.ipojo.test.composite.handler.CheckServiceHandler">
+<ipojo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/schemas/core.xsd 
+	    org.apache.felix.composite http://people.apache.org/~clement/ipojo/schemas/composite.xsd"
+	xmlns="org.apache.felix.ipojo"
+	xmlns:comp="org.apache.felix.ipojo.composite"
+	xmlns:cs="org.apache.felix.ipojo.test.composite.handler.CheckServiceHandler">
 	<!-- Used component type -->
 	<component
-		className="org.apache.felix.ipojo.test.composite.component.FooProviderType1"
+		classname="org.apache.felix.ipojo.test.composite.component.FooProviderType1"
 		name="COMPO-FooProviderType-1" architecture="true">
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.composite.component.FooProviderType1"
+		classname="org.apache.felix.ipojo.test.composite.component.FooProviderType1"
 		name="COMPO-FooProviderType-2" architecture="true">
 		<provides>
 			<property name="int" type="int" value="2" />
@@ -18,7 +24,7 @@
 		</provides>
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.composite.component.FooProviderTypeDyn"
+		classname="org.apache.felix.ipojo.test.composite.component.FooProviderTypeDyn"
 		name="COMPO-FooProviderType-Dyn" architecture="true">
 		<provides>
 			<property name="int" field="intProp" value="2" />
@@ -30,7 +36,7 @@
 		</provides>
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.composite.component.FooProviderTypeDyn2"
+		classname="org.apache.felix.ipojo.test.composite.component.FooProviderTypeDyn2"
 		name="COMPO-FooProviderType-Dyn2" architecture="true">
 		<provides>
 			<property name="int" field="intProp" value="4" />
@@ -42,24 +48,24 @@
 		</provides>
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.composite.component.CheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.composite.component.CheckServiceProvider"
 		name="COMPO-SimpleCheckServiceProvider" architecture="true">
 		<requires field="fs" />
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.composite.component.FooBarProviderType1"
+		classname="org.apache.felix.ipojo.test.composite.component.FooBarProviderType1"
 		name="COMPO-FooBarProviderType-1" architecture="true">
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.composite.component.FooBarProviderType1"
+		classname="org.apache.felix.ipojo.test.composite.component.FooBarProviderType1"
 		name="COMPO-FooBarProviderType-2" architecture="true">
 		<provides
 			interface="{org.apache.felix.ipojo.test.composite.service.FooService, org.apache.felix.ipojo.test.composite.service.BarService }" />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.composite.component.FooBarProviderType1"
+		classname="org.apache.felix.ipojo.test.composite.component.FooBarProviderType1"
 		name="COMPO-FooBarProviderType-3" architecture="true">
 		<provides
 			interface="{org.apache.felix.ipojo.test.composite.service.FooService}">
@@ -72,8 +78,8 @@
 	</component>
 	
 	<component
-		className="org.apache.felix.ipojo.test.composite.component.BazProviderType1"
-		name="BazProviderType" scope="composite">
+		classname="org.apache.felix.ipojo.test.composite.component.BazProviderType1"
+		name="BazProviderType">
 		<provides />
 	</component>
 	
@@ -96,10 +102,10 @@
 	</component>
 	
 	<!--  Composite -->
-	<composite name="composite.empty" architecture="true">
-	</composite>
+	<comp:composite name="composite.empty" architecture="true">
+	</comp:composite>
 	
-	<component className="org.apache.felix.ipojo.test.composite.component.Baz2CheckProvider" name="Baz2CheckProvider" architecture="true">
+	<component classname="org.apache.felix.ipojo.test.composite.component.Baz2CheckProvider" name="Baz2CheckProvider" architecture="true">
 		<requires field="fs" scope="composite"/>
 		<provides/>
 	</component>

Modified: felix/trunk/ipojo/tests/composite/import-export/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/composite/import-export/src/main/resources/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/composite/import-export/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/composite/import-export/src/main/resources/metadata.xml Tue Sep  9 07:21:15 2008
@@ -1,82 +1,87 @@
 <ipojo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/schemas/core.xsd 
+	    org.apache.felix.composite http://people.apache.org/~clement/ipojo/schemas/composite.xsd"
+	xmlns="org.apache.felix.ipojo"
+	xmlns:comp="org.apache.felix.ipojo.composite"
 	xmlns:cs="org.apache.felix.ipojo.test.composite.handler.CheckServiceHandler">
-	<composite name="composite.requires.1" architecture="true">
+	<comp:composite name="composite.requires.1" architecture="true">
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.FooService"
-			scope="composite" />
-	</composite>
+			scope="comp:composite" />
+	</comp:composite>
 
-	<composite name="composite.requires.2" architecture="true">
+	<comp:composite name="composite.requires.2" architecture="true">
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.FooService"
-			aggregate="true" scope="composite" />
-	</composite>
+			aggregate="true" scope="comp:composite" />
+	</comp:composite>
 
-	<composite name="composite.requires.3" architecture="true">
+	<comp:composite name="composite.requires.3" architecture="true">
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.FooService"
-			optional="true" scope="composite" />
-	</composite>
+			optional="true" scope="comp:composite" />
+	</comp:composite>
 
-	<composite name="composite.requires.4" architecture="true">
+	<comp:composite name="composite.requires.4" architecture="true">
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.FooService"
-			optional="true" aggregate="true" scope="composite" />
-	</composite>
+			optional="true" aggregate="true" scope="comp:composite" />
+	</comp:composite>
 
-	<composite name="composite.requires.5" architecture="true">
+	<comp:composite name="composite.requires.5" architecture="true">
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.FooService"
-			filter="(&amp;(int=2)(long=40))" scope="composite" />
-	</composite>
+			filter="(&amp;(int=2)(long=40))" scope="comp:composite" />
+	</comp:composite>
 
-	<composite name="composite.export.1" architecture="true">
+	<comp:composite name="composite.export.1" architecture="true">
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
 			aggregate="true" optional="true" filter="(!(instance.name=export))"
-			scope="composite" />
-		<provides action="export"
+			scope="comp:composite" />
+		<comp:provides action="export"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService" />
-	</composite>
+	</comp:composite>
 
-	<composite name="composite.export.2" architecture="true">
+	<comp:composite name="composite.export.2" architecture="true">
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
-			scope="composite" aggregate="true" optional="true"
+			scope="comp:composite" aggregate="true" optional="true"
 			filter="(!(instance.name=export))" />
-		<provides action="export"
+		<comp:provides action="export"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
 			optional="true" />
-	</composite>
+	</comp:composite>
 
-	<composite name="composite.export.3" architecture="true">
+	<comp:composite name="composite.export.3" architecture="true">
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
-			scope="composite" aggregate="true" optional="true"
+			scope="comp:composite" aggregate="true" optional="true"
 			filter="(!(instance.name=export))" />
-		<provides action="export"
+		<comp:provides action="export"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
 			aggregate="true" />
-	</composite>
+	</comp:composite>
 
-	<composite name="composite.export.4" architecture="true">
+	<comp:composite name="composite.export.4" architecture="true">
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
 			aggregate="true" optional="true" filter="(!(instance.name=export))"
 			scope="composite" />
-		<provides action="export"
+		<comp:provides action="export"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
 			aggregate="true" optional="true" />
-	</composite>
+	</comp:composite>
 
-	<composite name="composite.export.5" architecture="true">
+	<comp:composite name="composite.export.5" architecture="true">
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
 			aggregate="true" optional="true" filter="(!(instance.name=export))"
 			scope="composite" />
-		<provides action="export"
+		<comp:provides action="export"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
 			filter="(instance.name=foo1)" />
-	</composite>
+	</comp:composite>
 
 </ipojo>

Modified: felix/trunk/ipojo/tests/composite/service-instance/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/composite/service-instance/src/main/resources/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/composite/service-instance/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/composite/service-instance/src/main/resources/metadata.xml Tue Sep  9 07:21:15 2008
@@ -1,30 +1,36 @@
-<ipojo xmlns:cs="org.apache.felix.ipojo.test.composite.handler.CheckServiceHandler">	
-	<composite name="composite.bar.1" architecture="true">
+<ipojo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/schemas/core.xsd 
+	    org.apache.felix.composite http://people.apache.org/~clement/ipojo/schemas/composite.xsd"
+	xmlns="org.apache.felix.ipojo"
+	xmlns:comp="org.apache.felix.ipojo.composite"
+	xmlns:cs="org.apache.felix.ipojo.test.composite.handler.CheckServiceHandler">	
+	<comp:composite name="composite.bar.1" architecture="true">
 		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService"/>
-	</composite>
+	</comp:composite>
 	
-	<composite name="composite.bar.2" architecture="true">
+	<comp:composite name="composite.bar.2" architecture="true">
 		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService" aggregate="true"/>
-	</composite>
+	</comp:composite>
 	
-	<composite name="composite.bar.3" architecture="true">
+	<comp:composite name="composite.bar.3" architecture="true">
 		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService" optional="true"/>
-	</composite>
+	</comp:composite>
 	
-	<composite name="composite.bar.4" architecture="true">
+	<comp:composite name="composite.bar.4" architecture="true">
 		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.FooService" aggregate="true" optional="true"/>
-	</composite>
+	</comp:composite>
 	
-	<composite name="composite.bar.5-accept" architecture="true">
+	<comp:composite name="composite.bar.5-accept" architecture="true">
 		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.FooService">
 			<property name="boolean" value="true"/>
 			<property name="string" value="foo"/>
 			<property name="strAprop" value="{foo, bar, baz}"/>
 			<property name="int" value="5"/>
 		</subservice>
-	</composite>
+	</comp:composite>
 	
-	<composite name="composite.bar.5-refuse1" architecture="true">
+	<comp:composite name="composite.bar.5-refuse1" architecture="true">
 		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService">
 			<property name="foo" value="bar"/>
 			<property name="boolean" value="true"/>
@@ -32,23 +38,23 @@
 			<property name="strAprop" value="{foo, bar, baz}"/>
 			<property name="int" value="5"/>
 		</subservice>
-	</composite>
+	</comp:composite>
 	
-	<composite name="composite.bar.5-refuse2" architecture="true">
+	<comp:composite name="composite.bar.5-refuse2" architecture="true">
 		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService">
 			<property name="string" value="foo"/>
 			<property name="strAprop" value="{foo, bar, baz}"/>
 		</subservice>
-	</composite>
+	</comp:composite>
 
     <!-- Instance of a specified component -->
-	<composite name="composite.inst.1" architecture="true">
+	<comp:composite name="composite.inst.1" architecture="true">
 		<instance component="COMPO-FooProviderType-1" /> <!-- name="FooProv"  -->
 		<instance component="COMPO-FooProviderType-Dyn2">
 			<property name="boolean" value="true"/>
 			<property name="string" value="foo"/>
 			<property name="strAProp" value="{a,b,c}"/>
 		</instance>
-	</composite>
+	</comp:composite>
 
 </ipojo>

Modified: felix/trunk/ipojo/tests/composite/service-providing/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/composite/service-providing/src/main/resources/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/composite/service-providing/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/composite/service-providing/src/main/resources/metadata.xml Tue Sep  9 07:21:15 2008
@@ -1,150 +1,155 @@
-<ipojo>
-	<composite name="composite.test.3" architecture="true">
+<ipojo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/schemas/core.xsd 
+	    org.apache.felix.composite http://people.apache.org/~clement/ipojo/schemas/composite.xsd"
+	xmlns="org.apache.felix.ipojo"
+	xmlns:comp="org.apache.felix.ipojo.composite">
+	<comp:composite name="composite.test.3" architecture="true">
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
 			aggregate="true" filter="(factory.name=BazProviderType)" />
-		<provides action="export"
+		<comp:provides action="export"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService" />
-	</composite>
+	</comp:composite>
 
-	<composite name="composite.test.2" architecture="true">
+	<comp:composite name="composite.test.2" architecture="true">
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.CheckService"
 			filter="(factory.name=Baz2CheckProvider)" />
-		<provides action="export"
+		<comp:provides action="export"
 			specification="org.apache.felix.ipojo.test.composite.service.CheckService" />
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
 			scope="composite" />
-	</composite>
+	</comp:composite>
 
-	<composite name="composite.test.1" architecture="true">
+	<comp:composite name="composite.test.1" architecture="true">
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
 			filter="(factory.name=composite.test.3)" />
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.CheckService"
 			filter="(factory.name=composite.test.2)" />
-		<provides action="export"
+		<comp:provides action="export"
 			specification="org.apache.felix.ipojo.test.composite.service.CheckService" />
-	</composite>
+	</comp:composite>
 
-	<composite name="composite.instantiator" architecture="true">
+	<comp:composite name="composite.instantiator" architecture="true">
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService"
 			filter="(factory.name=composite.test.3)" />
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.FooService" />
-		<provides action="export"
+		<comp:provides action="export"
 			specification="org.apache.felix.ipojo.test.composite.service.BazService" />
-		<provides action="export"
+		<comp:provides action="export"
 			specification="org.apache.felix.ipojo.test.composite.service.FooService" />
-	</composite>
+	</comp:composite>
 
 	<!-- Test composition provides -->
 
-	<composite name="comp-0" architecture="true">
+	<comp:composite name="comp-0" architecture="true">
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.Tata" />
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.Toto" />
-		<provides action="implement"
+		<comp:provides action="implement"
 			specification="org.apache.felix.ipojo.test.composite.service.Tota" />
-	</composite>
+	</comp:composite>
 
-	<composite name="comp-1" architecture="true">
+	<comp:composite name="comp-1" architecture="true">
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.Tata" />
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.Toto" />
-		<provides action="implement"
+		<comp:provides action="implement"
 			specification="org.apache.felix.ipojo.test.composite.service.Tota">
 			<delegation method="tataInt" policy="One" />
 			<delegation method="toto1" policy="All" />
-		</provides>
-	</composite>
+		</comp:provides>
+	</comp:composite>
 
-	<composite name="comp-2" architecture="true">
+	<comp:composite name="comp-2" architecture="true">
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.Tata"
 			aggregate="true" />
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.Toto"
 			aggregate="true" />
-		<provides action="implement"
+		<comp:provides action="implement"
 			specification="org.apache.felix.ipojo.test.composite.service.Tota">
 			<delegation method="tataInt" policy="One" />
 			<delegation method="toto1" policy="All" />
-		</provides>
-	</composite>
+		</comp:provides>
+	</comp:composite>
 
-	<composite name="comp-3" architecture="true">
+	<comp:composite name="comp-3" architecture="true">
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.Tata" />
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.Toto"
 			optional="true" />
-		<provides action="implement"
+		<comp:provides action="implement"
 			specification="org.apache.felix.ipojo.test.composite.service.Tota">
-		</provides>
-	</composite>
+		</comp:provides>
+	</comp:composite>
 
-	<composite name="comp-4" architecture="true">
+	<comp:composite name="comp-4" architecture="true">
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.Tata" />
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.Toto"
 			optional="true" />
-		<provides action="implement"
+		<comp:provides action="implement"
 			specification="org.apache.felix.ipojo.test.composite.service.Tota">
 			<delegation method="tataInt" policy="One" />
 			<delegation method="toto1" policy="All" />
-		</provides>
-	</composite>
+		</comp:provides>
+	</comp:composite>
 
-	<composite name="comp-5" architecture="true">
+	<comp:composite name="comp-5" architecture="true">
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.Tata"
 			aggregate="true" />
-		<!-- <subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.Toto" aggregate ="true" optional="true"/> -->
-		<provides action="implement"
+		<!-- <subservice action="import" specification="org.apache.felix.ipojo.test.comp:composite.service.Toto" aggregate ="true" optional="true"/> -->
+		<comp:provides action="implement"
 			specification="org.apache.felix.ipojo.test.composite.service.Tota">
 			<delegation method="tataInt" policy="One" />
 			<delegation method="toto1" policy="All" />
-		</provides>
-	</composite>
+		</comp:provides>
+	</comp:composite>
 
-	<composite name="comp-6" architecture="true">
+	<comp:composite name="comp-6" architecture="true">
 		<subservice action="instantiate"
 			specification="org.apache.felix.ipojo.test.composite.service.Tata"
 			aggregate="true" />
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.Toto"
 			aggregate="true" optional="true" />
-		<provides action="implement"
+		<comp:provides action="implement"
 			specification="org.apache.felix.ipojo.test.composite.service.Toto">
 			<delegation method="toto1" policy="All" />
-		</provides>
-		<provides action="implement"
+		</comp:provides>
+		<comp:provides action="implement"
 			specification="org.apache.felix.ipojo.test.composite.service.Tata">
 			<delegation method="tataInt" policy="One" />
-		</provides>
-	</composite>
+		</comp:provides>
+	</comp:composite>
 
-	<composite name="comp-7" architecture="true">
+	<comp:composite name="comp-7" architecture="true">
 		<instance component="tata" />
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.Toto" />
-		<provides action="implement"
+		<comp:provides action="implement"
 			specification="org.apache.felix.ipojo.test.composite.service.Tota" />
-	</composite>
+	</comp:composite>
 
-	<composite name="comp-8" architecture="true">
+	<comp:composite name="comp-8" architecture="true">
 		<instance component="tata" />
 		<instance component="totoglue" />
 		<subservice action="import"
 			specification="org.apache.felix.ipojo.test.composite.service.Toto" />
-		<provides action="implement"
+		<comp:provides action="implement"
 			specification="org.apache.felix.ipojo.test.composite.service.Tota" />
-	</composite>
+	</comp:composite>
 </ipojo>

Modified: felix/trunk/ipojo/tests/core/configuration/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/configuration/src/main/resources/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/configuration/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/core/configuration/src/main/resources/metadata.xml Tue Sep  9 07:21:15 2008
@@ -1,6 +1,7 @@
-<ipojo>
-	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn"
+<ipojo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/schemas/core.xsd" xmlns="org.apache.felix.ipojo">
+		<component
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn"
 		name="CONFIG-FooProviderType-Conf" architecture="true">
 		<provides />
 		<properties propagation="false">
@@ -13,7 +14,7 @@
 		</properties>
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
 		name="CONFIG-FooProviderType-3" architecture="true">
 		<provides>
 			<property name="foo" field="m_foo" />
@@ -27,7 +28,7 @@
 	</component>
 	<!-- Configuration Management Test -->
 	<component name="CONFIG-FieldConfigurableCheckService"
-		className="org.apache.felix.ipojo.test.scenarios.component.ConfigurableCheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.component.ConfigurableCheckServiceProvider"
 		architecture="true">
 		<provides />
 		<properties propagation="true">
@@ -53,7 +54,7 @@
 	</component>
 
 	<component name="CONFIG-BothConfigurableCheckService"
-		className="org.apache.felix.ipojo.test.scenarios.component.ConfigurableCheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.component.ConfigurableCheckServiceProvider"
 		architecture="true">
 		<provides />
 		<properties propagation="true">
@@ -79,7 +80,7 @@
 	</component>
 
 	<component name="CONFIG-MethodConfigurableCheckService"
-		className="org.apache.felix.ipojo.test.scenarios.component.ConfigurableCheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.component.ConfigurableCheckServiceProvider"
 		architecture="true">
 		<provides />
 		<properties propagation="true">
@@ -105,7 +106,7 @@
 	</component>
 
 	<component name="CONFIG-ParentMethodConfigurableCheckService"
-		className="org.apache.felix.ipojo.test.scenarios.component.ParentConfigurableCheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.component.ParentConfigurableCheckServiceProvider"
 		architecture="true">
 		<provides />
 		<properties propagation="true">
@@ -132,7 +133,7 @@
 	</component>
 	
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
 		name="CONFIG-FooProviderType-4" architecture="true">
 		<provides>
 			<property name="foo" field="m_foo" />

Modified: felix/trunk/ipojo/tests/core/external-handlers/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/external-handlers/src/main/resources/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/external-handlers/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/core/external-handlers/src/main/resources/metadata.xml Tue Sep  9 07:21:15 2008
@@ -1,4 +1,7 @@
 <ipojo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/schemas/core.xsd"
+    xmlns="org.apache.felix.ipojo"
 	xmlns:cs="org.apache.felix.ipojo.test.handler.checkservice">
 	<handler
 		classname="org.apache.felix.ipojo.test.scenarios.component.CheckServiceHandler"
@@ -8,7 +11,7 @@
 		<controller field="isValid" />
 	</handler>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
 		name="HANDLER-HandlerTester" architecture="true">
 		<cs:check />
 	</component>

Modified: felix/trunk/ipojo/tests/core/factories/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/factories/src/main/resources/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/factories/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/core/factories/src/main/resources/metadata.xml Tue Sep  9 07:21:15 2008
@@ -1,21 +1,25 @@
-<ipojo>
+<ipojo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/schemas/core.xsd"
+    xmlns="org.apache.felix.ipojo"
+    >
 	<!-- Simple provider  -->
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
 		name="Factories-FooProviderType-1" architecture="true">
 		<provides />
 	</component>
 	
 	<!-- Provider providing 2 services -->
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.FooBarProviderType1"
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooBarProviderType1"
 		name="Factories-FooBarProviderType-1" architecture="true">
 		<provides />
 	</component>
 	
 	<!-- Provider with dynamic property -->
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn"
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn"
 		name="Factories-FooProviderType-Dyn" architecture="true">
 		<provides>
 			<property name="int" field="intProp" value="2" />
@@ -28,7 +32,7 @@
 	</component>
 	
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
 		name="Factories-FooProviderType-2" architecture="true">
 		<provides>
 			<property name="int" type="int" value="2" />
@@ -41,7 +45,7 @@
 	</component>
 	
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn2"
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderTypeDyn2"
 		name="Factories-FooProviderType-Dyn2" architecture="true">
 		<provides>
 			<property name="int" field="intProp" value="4" />
@@ -54,7 +58,7 @@
 	</component>
 	
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
 		name="Factories-FooProviderType-3" architecture="true">
 		<provides>
 			<property name="foo" field="m_foo" />

Modified: felix/trunk/ipojo/tests/core/lifecycle-callback/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/lifecycle-callback/src/main/resources/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/lifecycle-callback/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/core/lifecycle-callback/src/main/resources/metadata.xml Tue Sep  9 07:21:15 2008
@@ -1,13 +1,17 @@
-<ipojo>
+<ipojo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/schemas/core.xsd"
+    xmlns="org.apache.felix.ipojo"
+>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
+		classname="org.apache.felix.ipojo.test.scenarios.component.FooProviderType1"
 		name="LFCB-FooProviderType-1" architecture="true">
 		<provides />
 	</component>
 	
 	<!-- Lifecycle Callback -->
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.CallbackCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.component.CallbackCheckService"
 		name="LFCB-CallbackCheckService" architecture="true">
 		<requires field="fs" />
 		<provides />
@@ -15,7 +19,7 @@
 		<callback transition="invalidate" method="stop" />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.CallbackCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.component.CallbackCheckService"
 		name="LFCB-ParentCallbackCheckService" architecture="true">
 		<requires field="fs" />
 		<provides />
@@ -23,7 +27,7 @@
 		<callback transition="invalidate" method="parentStop" />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.CallbackCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.component.CallbackCheckService"
 		immediate="true" name="LFCB-ImmediateCallbackCheckService"
 		architecture="true">
 		<requires field="fs" />
@@ -32,7 +36,7 @@
 		<callback transition="invalidate" method="stop" />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.CallbackCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.component.CallbackCheckService"
 		immediate="true" name="LFCB-ImmediateCallbackCheckServiceSingleton"
 		factory-method="singleton" architecture="true">
 		<requires field="fs" />
@@ -41,7 +45,7 @@
 		<callback transition="invalidate" method="stop" />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.component.CallbackCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.component.CallbackCheckService"
 		immediate="true" name="LFCB-ImmediateCallbackCheckServiceSeveral"
 		factory-method="several" architecture="true">
 		<requires field="fs" />

Modified: felix/trunk/ipojo/tests/core/lifecycle-controller/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/lifecycle-controller/src/main/resources/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/lifecycle-controller/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/core/lifecycle-controller/src/main/resources/metadata.xml Tue Sep  9 07:21:15 2008
@@ -1,4 +1,7 @@
-<ipojo>
+<ipojo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/schemas/core.xsd"
+    xmlns="org.apache.felix.ipojo">
 	<component
 		classname="org.apache.felix.ipojo.test.scenarios.component.LifecycleControllerTest"
 		name="LFC-Test">

Modified: felix/trunk/ipojo/tests/core/service-dependency-bindingpolicy/src/main/resources/metadata.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/service-dependency-bindingpolicy/src/main/resources/metadata.xml?rev=693468&r1=693467&r2=693468&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/service-dependency-bindingpolicy/src/main/resources/metadata.xml (original)
+++ felix/trunk/ipojo/tests/core/service-dependency-bindingpolicy/src/main/resources/metadata.xml Tue Sep  9 07:21:15 2008
@@ -1,14 +1,18 @@
-<ipojo>
+<ipojo 
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="org.apache.felix.ipojo http://people.apache.org/~clement/ipojo/schemas/core.xsd"
+    xmlns="org.apache.felix.ipojo"
+>
 
 	<!-- Static Dependencies -->
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
 		name="StaticSimpleCheckServiceProvider" architecture="true">
 		<requires field="fs" policy="static" />
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
 		name="StaticVoidCheckServiceProvider" architecture="true">
 		<requires field="fs" policy="static">
 			<callback type="bind" method="voidBind" />
@@ -17,7 +21,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
 		name="StaticObjectCheckServiceProvider" architecture="true">
 		<requires field="fs" policy="static">
 			<callback type="bind" method="objectBind" />
@@ -26,7 +30,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
 		name="StaticRefCheckServiceProvider" architecture="true">
 		<requires field="fs" policy="static">
 			<callback type="bind" method="refBind" />
@@ -35,7 +39,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
 		name="StaticBothCheckServiceProvider" architecture="true">
 		<requires field="fs" policy="static">
 			<callback type="bind" method="bothBind" />
@@ -44,7 +48,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodCheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodCheckServiceProvider"
 		name="StaticMObjectCheckServiceProvider" architecture="true">
 		<requires policy="static">
 			<callback type="bind" method="objectBind" />
@@ -53,7 +57,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodCheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodCheckServiceProvider"
 		name="StaticMRefCheckServiceProvider" architecture="true">
 		<requires
 			interface="org.apache.felix.ipojo.test.scenarios.service.dependency.service.FooService"
@@ -64,7 +68,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodCheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodCheckServiceProvider"
 		name="StaticMBothCheckServiceProvider" architecture="true">
 		<requires policy="static">
 			<callback type="bind" method="bothBind" />
@@ -75,14 +79,14 @@
 
 	<!-- Static Simple & Optional Dependencies -->
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
 		name="StaticSimpleOptionalCheckServiceProvider"
 		architecture="true">
 		<requires field="fs" optional="true" policy="static" />
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
 		name="StaticVoidOptionalCheckServiceProvider"
 		architecture="true">
 		<requires field="fs" optional="true" policy="static">
@@ -92,7 +96,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
 		name="StaticObjectOptionalCheckServiceProvider"
 		architecture="true">
 		<requires field="fs" optional="true" policy="static">
@@ -102,7 +106,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
 		name="StaticRefOptionalCheckServiceProvider" architecture="true">
 		<requires field="fs" optional="true" policy="static">
 			<callback type="bind" method="refBind" />
@@ -111,7 +115,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.CheckServiceProvider"
 		name="StaticBothOptionalCheckServiceProvider"
 		architecture="true">
 		<requires field="fs" optional="true" policy="static">
@@ -121,7 +125,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodCheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodCheckServiceProvider"
 		name="StaticMObjectOptionalCheckServiceProvider"
 		architecture="true">
 		<requires optional="true" policy="static">
@@ -131,7 +135,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodCheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodCheckServiceProvider"
 		name="StaticMRefOptionalCheckServiceProvider"
 		architecture="true">
 		<requires
@@ -143,7 +147,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodCheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodCheckServiceProvider"
 		name="StaticMBothOptionalCheckServiceProvider"
 		architecture="true">
 		<requires
@@ -156,14 +160,14 @@
 	</component>
 	<!--  Static Multiple Dependencies -->
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MultipleCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MultipleCheckService"
 		name="StaticSimpleMultipleCheckServiceProvider"
 		architecture="true">
 		<requires field="fs" policy="static" />
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MultipleCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MultipleCheckService"
 		name="StaticVoidMultipleCheckServiceProvider"
 		architecture="true">
 		<requires field="fs" policy="static">
@@ -173,7 +177,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MultipleCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MultipleCheckService"
 		name="StaticObjectMultipleCheckServiceProvider"
 		architecture="true">
 		<requires field="fs" policy="static">
@@ -183,7 +187,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MultipleCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MultipleCheckService"
 		name="StaticRefMultipleCheckServiceProvider" architecture="true">
 		<requires field="fs" policy="static">
 			<callback type="bind" method="refBind" />
@@ -192,7 +196,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MultipleCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MultipleCheckService"
 		name="StaticBothMultipleCheckServiceProvider"
 		architecture="true">
 		<requires field="fs" policy="static">
@@ -202,7 +206,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodMultipleCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodMultipleCheckService"
 		name="StaticMObjectMultipleCheckServiceProvider"
 		architecture="true">
 		<requires aggregate="true" policy="static">
@@ -212,7 +216,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodMultipleCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodMultipleCheckService"
 		name="StaticMRefMultipleCheckServiceProvider"
 		architecture="true">
 		<requires
@@ -224,7 +228,7 @@
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodMultipleCheckService"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.MethodMultipleCheckService"
 		name="StaticMBothMultipleCheckServiceProvider"
 		architecture="true">
 		<requires aggregate="true" policy="static">
@@ -236,20 +240,20 @@
 	
 	<!-- Dynamic-Priority -->
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.dynamic.priority.RankedFooProviderType1"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.dynamic.priority.RankedFooProviderType1"
 		name="RankedFooProviderType" architecture="true">
 		<provides>
 			<property field="m_grade" name="service.ranking"/>
 		</provides>
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.DynCheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.DynCheckServiceProvider"
 		name="DPSimpleCheckServiceProvider" architecture="true">
 		<requires field="fs" policy="dynamic-priority" />
 		<provides />
 	</component>
 	<component
-		className="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.DynCheckServiceProvider"
+		classname="org.apache.felix.ipojo.test.scenarios.service.dependency.policies.DynCheckServiceProvider"
 		name="DPObjectCheckServiceProvider" architecture="true">
 		<requires field="fs" policy="dynamic-priority">
 			<callback type="bind" method="objectBind" />