You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by re...@apache.org on 2005/04/04 15:02:28 UTC

svn commit: r160037 - in cocoon/trunk/src/schema: deploy-schema-1.0.xsd test-deploy.xml

Author: reinhard
Date: Mon Apr  4 06:02:28 2005
New Revision: 160037

URL: http://svn.apache.org/viewcvs?view=rev&rev=160037
Log:
a block requires an interface and not another block directly; add comments; ... maybe we should rename interface to 'contract' as interface could be mistaken

Modified:
    cocoon/trunk/src/schema/deploy-schema-1.0.xsd
    cocoon/trunk/src/schema/test-deploy.xml

Modified: cocoon/trunk/src/schema/deploy-schema-1.0.xsd
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/deploy-schema-1.0.xsd?view=diff&r1=160036&r2=160037
==============================================================================
--- cocoon/trunk/src/schema/deploy-schema-1.0.xsd (original)
+++ cocoon/trunk/src/schema/deploy-schema-1.0.xsd Mon Apr  4 06:02:28 2005
@@ -67,19 +67,25 @@
   <xs:element name="block">
   	<xs:complexType>
   		<xs:sequence>
-  			<xs:element ref="property" minOccurs="0" maxOccurs="unbounded"/>
+  			<xs:element ref="use" minOccurs="0" maxOccurs="unbounded"/>
+   			<xs:element ref="property" minOccurs="0" maxOccurs="unbounded"/> 			
   		</xs:sequence>  		
   		<xs:attribute name="id" type="xs:anyURI" use="required"/>
   		<xs:attribute name="auto-resolve" type="xs:boolean" use="optional" default="false"/>
   		<xs:attribute name="path" type="xs:anyURI" use="optional"/>
   	</xs:complexType>  	
   </xs:element>  
+  <xs:element name="use">
+  	<xs:complexType>
+  		<xs:attribute name="interface" type="xs:anyURI" use="required"/>
+  		<xs:attribute name="block" type="xs:anyURI" use="required"/>
+  	</xs:complexType>   	
+  </xs:element>
   <xs:element name="property">
   	<xs:complexType>
   		<xs:attribute name="name" type="xs:string" use="required"/>
   		<xs:attribute name="value" type="xs:string" use="required"/>
   	</xs:complexType>   	
   </xs:element>
-
 
 </xs:schema>

Modified: cocoon/trunk/src/schema/test-deploy.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/schema/test-deploy.xml?view=diff&r1=160036&r2=160037
==============================================================================
--- cocoon/trunk/src/schema/test-deploy.xml (original)
+++ cocoon/trunk/src/schema/test-deploy.xml Mon Apr  4 06:02:28 2005
@@ -23,8 +23,14 @@
     <locator uri="http://cocoon.apache.org/block-repository/"/>
   </locators>
   <install>
+  	<!-- install Cocoon 2.2 at d:\ -->
     <cocoon version="2.2" target-uri="d:\"/>
-    <block id="http://mycompany.com/webmail/1.3.43" auto-resolve="true">
+    <!-- install this block and set the property xyz and define which
+         block implementations should be used for the defined requirements 
+         this overrides the default values set in block.xml -->
+    <block id="http://mycompany.com/webmail/1.3.43" auto-resolve="false">
+    	<use block="http://mycompany.com/myblock/1.3.43" interface="http://bla/1.0" />
+    	<use block="http://mycompany.com/myOtherBlock/1.3.43" interface="http://bar/1.0" />    	
       <property name="mailserver" value="xyz"/>
     </block>
     <block id="http://mycompany.com/myblock/1.3.43" auto-resolve="false">