Index: /xssim/trunk/src/test/rewolucja/schemas/XSSimResSchema.xsd
===================================================================
--- /xssim/trunk/src/test/rewolucja/schemas/XSSimResSchema.xsd	(revision 293)
+++ /xssim/trunk/src/test/rewolucja/schemas/XSSimResSchema.xsd	(revision 296)
@@ -8,33 +8,32 @@
 		</xs:annotation>
 		<xs:sequence>
-			<xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
-		</xs:sequence>
-	</xs:complexType>
-	
-	<xs:complexType name="resource">
+			<xs:element name="name" type="xs:string"></xs:element>
+		</xs:sequence>
+	</xs:complexType>
+	
+	<xs:complexType name="resourceType">
+		<xs:annotation>
+			<xs:documentation>Base resource type</xs:documentation>
+		</xs:annotation>
 		<xs:attribute name="type" type="xs:string" use="required" />
 		<xs:attribute name="id" type="xs:ID" use="optional" />
-		<xs:attribute name="count" type="xs:integer" use="optional" />
-	</xs:complexType>
-
-	<xs:complexType name="computingResourceInterface">
-		<xs:annotation>
-			<xs:documentation>Computing resource</xs:documentation>
-		</xs:annotation>
-		<xs:complexContent>
-			<xs:extension base="resource">
-			<xs:sequence>
-				<xs:choice minOccurs="0" maxOccurs="unbounded">
-					<xs:element name="computingResource" type="computingResourceType"></xs:element>
-					<xs:element name="resourceParameter" type="computingResourceParameterType"></xs:element>
-					<xs:element name="otherParameter" type="otherParameterType"/>
-				</xs:choice>
-				<xs:choice minOccurs="0" maxOccurs="1">
-					<xs:element name="energyEstimationPlugin" type="energyEstimationPluginType"></xs:element>
-				</xs:choice>
-				<xs:choice minOccurs="0" maxOccurs="1">
-					<xs:element name="energyPowerProfile" type="energyPowerProfileType"></xs:element>
-				</xs:choice>
-			</xs:sequence>
+	</xs:complexType>
+
+	<xs:complexType name="computingResourceTemplateType">
+		<xs:annotation>
+			<xs:documentation>Computing resource template</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="resourceType">
+				<xs:sequence>
+					<xs:choice minOccurs="0" maxOccurs="unbounded">
+						<xs:element name="computingResource" type="computingResourceType"></xs:element>
+						<xs:element name="resourceUnit" type="resourceUnitType"></xs:element>
+						<xs:element name="otherParameter" type="parameterType"/>
+					</xs:choice>
+					<xs:element name="energyEstimationPlugin" type="energyEstimationPluginType" minOccurs="0" maxOccurs="1"></xs:element>
+					<xs:element name="energyPowerProfile" type="energyPowerProfileType" minOccurs="0" maxOccurs="1"></xs:element>
+				</xs:sequence>
+				<xs:attribute name="count" type="xs:integer" use="optional" />
 			</xs:extension>
 		</xs:complexContent>
@@ -43,29 +42,16 @@
 	<xs:complexType name="computingResourceType">
 		<xs:annotation>
-			<xs:documentation>Computing resource</xs:documentation>
-		</xs:annotation>
-		<xs:complexContent>
-			<xs:extension base="computingResourceInterface">
-				<xs:sequence>
-					<xs:choice minOccurs="0" maxOccurs="1">
-						<xs:element name="location" type="locationType"></xs:element>
-					</xs:choice>
-					<xs:choice minOccurs="0" maxOccurs="1">
-						<xs:element name="size" type="sizeType"></xs:element>
-					</xs:choice>
-				</xs:sequence>
+			<xs:documentation>Computing resource instance</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="computingResourceTemplateType">
+				<xs:sequence minOccurs="0" maxOccurs="1">
+					<xs:element name="location" type="locationType"></xs:element>
+				</xs:sequence>
+				<xs:attribute name="groupId" type="xs:integer" use="optional"/>
 				<xs:attribute name="templateId" type="xs:IDREF" use="optional"/>
 			</xs:extension>
 		</xs:complexContent>
 	</xs:complexType>
-	
-	<xs:complexType name="computingResourceTemplateType">
-		<xs:annotation>
-			<xs:documentation>Computing resource template</xs:documentation>
-		</xs:annotation>
-		<xs:complexContent>
-			<xs:extension base="computingResourceInterface"/>
-		</xs:complexContent>
-	</xs:complexType>
 
 	<xs:complexType name="schedulerType">
@@ -74,11 +60,11 @@
 		</xs:annotation>
 		<xs:complexContent>
-			<xs:extension base="resource">
-				<xs:sequence minOccurs="0" maxOccurs="1">
+			<xs:extension base="resourceType">
+				<xs:sequence>
 					<xs:element name="schedulingPlugin" type="schedulingPluginType" minOccurs="0" maxOccurs="1"></xs:element>
 					<xs:choice minOccurs="0" maxOccurs="unbounded">
 						<xs:element name="scheduler" type="schedulerType"></xs:element>
-						<xs:element name="managedComputingResource" type="managedComputingResourceType" minOccurs="0" maxOccurs="1"></xs:element>
-						<xs:element name="schedulingParameter" type="parameterType" minOccurs="0" maxOccurs="1"></xs:element>
+						<xs:element name="managedComputingResource" type="managedComputingResourceType"></xs:element>
+						<xs:element name="parameter" type="parameterType"></xs:element>
 					</xs:choice>
 				</xs:sequence>
@@ -97,19 +83,20 @@
 	</xs:complexType>
 	
-	<!--  
-	<xs:complexType name="schedulingParameterType">
-		<xs:annotation>
-			<xs:documentation>Scheduling resource related parameter</xs:documentation>
-		</xs:annotation>
-		<xs:complexContent>
-			<xs:extension base="parameterType">
-			</xs:extension>
-		</xs:complexContent>
-	</xs:complexType>
-	-->
+	<xs:complexType name="resourceUnitType">
+		<xs:annotation>
+			<xs:documentation>Description of resource unit</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="resourceType">
+				<xs:sequence>
+					<xs:element name="amount" type="xs:string"/>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
 	
 	<xs:complexType name="managedComputingResourceType">
 		<xs:annotation>
-			<xs:documentation>Computing resource</xs:documentation>
+			<xs:documentation>Definition of controlled (by scheduler) computing resources</xs:documentation>
 		</xs:annotation>
 		<xs:choice minOccurs="0" maxOccurs="1">
@@ -120,37 +107,12 @@
 	
 	<xs:complexType name="resourceList">
-		<xs:choice minOccurs="0" maxOccurs="unbounded">
+		<xs:annotation>
+			<xs:documentation>List of managed computing resources</xs:documentation>
+		</xs:annotation>
+		<xs:sequence minOccurs="0" maxOccurs="unbounded">
 			<xs:element name="resourceId" type="xs:string"></xs:element>
-		</xs:choice>
-	</xs:complexType>
-	
-	<xs:complexType name="computingResourceParameterType">
-		<xs:annotation>
-			<xs:documentation>Computational resource related parameter</xs:documentation>
-		</xs:annotation>
-		<xs:complexContent>
-			<xs:extension base="parameterType">
-			</xs:extension>
-		</xs:complexContent>
-	</xs:complexType>
-
-	<xs:simpleType name="computingResourceParameterName">
-		<xs:restriction base="xs:string">
-			<xs:enumeration value="arch"/>
-			<xs:enumeration value="memory"/>
-			<xs:enumeration value="freememory"/>
-			<xs:enumeration value="diskspace"/>
-			<xs:enumeration value="freediskspace"/>
-			<xs:enumeration value="speed"/>
-			<xs:enumeration value="cost"/>
-			<xs:enumeration value="load"/>
-			<xs:enumeration value="application"/>
-			<xs:enumeration value="osname"/>
-			<xs:enumeration value="ostype"/>
-			<xs:enumeration value="osversion"/>
-			<xs:enumeration value="osrelease"/>
-		</xs:restriction>
-	</xs:simpleType>
-	
+		</xs:sequence>
+	</xs:complexType>
+
 	<xs:complexType name="energyEstimationPluginType">
 		<xs:annotation>
@@ -158,8 +120,6 @@
 		</xs:annotation>
 		<xs:sequence>
-			<xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
-			<xs:choice minOccurs="0" maxOccurs="unbounded">
-				<xs:element name="energyParameter" type="parameterType"></xs:element>
-			</xs:choice>
+			<xs:element name="name" type="xs:string"></xs:element>
+			<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 		</xs:sequence>
 	</xs:complexType>
@@ -174,28 +134,22 @@
 				<xs:element name="powerStates" type="powerStatesType"></xs:element>
 				<xs:element name="pStates" type="pStatesType"></xs:element>
-				<xs:element name="energyParameter" type="parameterType"></xs:element>
+				<xs:element name="parameter" type="parameterType"></xs:element>
 			</xs:choice>
 		</xs:sequence>
 	</xs:complexType>
-	
-	<!-- 
-	<xs:complexType name="energyParameterType">
-		<xs:annotation>
-			<xs:documentation>Computational resource related parameter</xs:documentation>
-		</xs:annotation>
-		<xs:complexContent>
-			<xs:extension base="parameterType">
-			</xs:extension>
-		</xs:complexContent>
-	</xs:complexType>
-	-->
-	
+
 	<xs:complexType name="pStatesType">
-		<xs:choice minOccurs="1" maxOccurs="unbounded">
+		<xs:annotation>
+			<xs:documentation>Definition of supported  p-states</xs:documentation>
+		</xs:annotation>
+		<xs:sequence minOccurs="1" maxOccurs="unbounded">
 			<xs:element name="pState" type="pStateType"></xs:element>
-		</xs:choice>
+		</xs:sequence>
 	</xs:complexType>
 	
 	<xs:complexType name="pStateType">
+		<xs:annotation>
+			<xs:documentation>Definition of the p-state</xs:documentation>
+		</xs:annotation>
 		<xs:sequence>
 			<xs:element name="name" type="xs:string"></xs:element>
@@ -207,10 +161,16 @@
 	
 	<xs:complexType name="powerStatesType">
-		<xs:choice minOccurs="1" maxOccurs="unbounded">
+		<xs:annotation>
+			<xs:documentation>Definition of supported power states</xs:documentation>
+		</xs:annotation>
+		<xs:sequence minOccurs="1" maxOccurs="unbounded">
 			<xs:element name="powerState" type="powerStateType"></xs:element>
-		</xs:choice>
+		</xs:sequence>
 	</xs:complexType>
 	
 	<xs:complexType name="powerStateType">
+		<xs:annotation>
+			<xs:documentation>Definition of the power state</xs:documentation>
+		</xs:annotation>
 		<xs:sequence>
 			<xs:element name="name" type="xs:string"></xs:element>
@@ -221,4 +181,7 @@
 	
 	<xs:complexType name="energyStatesTransitionType">
+		<xs:annotation>
+			<xs:documentation>Description of power states transtition</xs:documentation>
+		</xs:annotation>
 		<xs:sequence>
 			<xs:element name="to" type="xs:string"></xs:element>
@@ -238,14 +201,13 @@
 		</xs:sequence>
 	</xs:complexType>
-
-	<xs:complexType name="sizeType">
-		<xs:annotation>
-			<xs:documentation>Size parameters of resource</xs:documentation>
-		</xs:annotation>
-		<xs:sequence>
-			<xs:element name="length" type="xs:long"/>
-			<xs:element name="width" type="xs:long"/>
-			<xs:element name="height" type="xs:long"/>
-		</xs:sequence>
+	
+	<xs:complexType name="baseParameterType">
+		<xs:annotation>
+			<xs:documentation>Base description of parameter of resource</xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element name="paramValue" type="xs:string"/>
+		</xs:sequence>
+		<xs:attribute name="name" type="xs:string" use="required"/>
 	</xs:complexType>
 	
@@ -254,16 +216,6 @@
 			<xs:documentation>Description of parameter of resource</xs:documentation>
 		</xs:annotation>
-		<xs:sequence>
-			<xs:element name="paramValue" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
-		</xs:sequence>
-		<xs:attribute name="name" type="xs:string" use="required"/>
-	</xs:complexType>
-	
-	<xs:complexType name="otherParameterType">
-		<xs:annotation>
-			<xs:documentation>Other parameters</xs:documentation>
-		</xs:annotation>
-		<xs:complexContent>
-			<xs:extension base="parameterType">
+		<xs:complexContent>
+			<xs:extension base="baseParameterType">
 				<xs:sequence>
 					<xs:element name="property" minOccurs="0" maxOccurs="unbounded">
@@ -286,5 +238,9 @@
 		<xs:complexType>
 			<xs:sequence>
-				<xs:element name="timeEstimationPlugin" type="timeEstimationPluginType" minOccurs="0" maxOccurs="1"></xs:element>
+				<xs:element name="timeEstimationPlugin" type="timeEstimationPluginType" minOccurs="0" maxOccurs="1">
+					<xs:annotation>
+						<xs:documentation>Specifies which plugin is used to estimate task execution time</xs:documentation>
+					</xs:annotation>
+				</xs:element>
 				<xs:element name="resources">
 					<xs:annotation>
@@ -294,5 +250,5 @@
 						<xs:sequence>
 							<xs:element name="computingResource" type="computingResourceType" maxOccurs="unbounded"/>
-							<xs:element name="scheduler" type="schedulerType" minOccurs="0"/>
+							<xs:element name="scheduler" type="schedulerType" maxOccurs="unbounded"/>
 						</xs:sequence>
 					</xs:complexType>
@@ -300,9 +256,9 @@
 				<xs:element name="templates" minOccurs="0">
 					<xs:annotation>
-						<xs:documentation>Description of resource templates</xs:documentation>
+						<xs:documentation>Definition of computing resource templates that can/will be used in resoce description section </xs:documentation>
 					</xs:annotation>
 					<xs:complexType>
-						<xs:sequence>
-							<xs:element name="computingResourceTemplate" type="computingResourceTemplateType" maxOccurs="unbounded"/>
+						<xs:sequence maxOccurs="unbounded">
+							<xs:element name="computingResourceTemplate" type="computingResourceTemplateType"/>
 						</xs:sequence>
 					</xs:complexType>
