[jboss-svn-commits] JBL Code SVN: r13951 - labs/jbossrules/trunk/drools-compiler/src/main/resources/META-INF.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Aug 2 04:56:21 EDT 2007


Author: mark.proctor at jboss.com
Date: 2007-08-02 04:56:21 -0400 (Thu, 02 Aug 2007)
New Revision: 13951

Added:
   labs/jbossrules/trunk/drools-compiler/src/main/resources/META-INF/drools-4.0.xsd
Log:
-added back in drools-4.0.xsd, mistakenly deleted.

Added: labs/jbossrules/trunk/drools-compiler/src/main/resources/META-INF/drools-4.0.xsd
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/resources/META-INF/drools-4.0.xsd	                        (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/resources/META-INF/drools-4.0.xsd	2007-08-02 08:56:21 UTC (rev 13951)
@@ -0,0 +1,381 @@
+<?xml version="1.0" encoding="UTF-8"?>
+        
+<xs:schema
+        xmlns:drools="http://drools.org/drools-4.0"
+        xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        elementFormDefault="qualified"
+        targetNamespace="http://drools.org/drools-4.0">
+
+    <xs:element name="package">
+		<xs:complexType>
+			<xs:choice maxOccurs="unbounded" minOccurs="0">
+				<xs:element ref="drools:import"/>
+				<xs:element ref="drools:global"/>
+				<xs:element ref="drools:function"/>
+				<xs:element ref="drools:rule"/>
+				<xs:element ref="drools:query"/>
+			</xs:choice>
+			<xs:attribute name="name" type="xs:string" use="required"/>
+		</xs:complexType>
+	</xs:element>
+    
+    <xs:element name="rule">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element maxOccurs="unbounded" minOccurs="0" ref="drools:rule-attribute"/>
+				<xs:element ref="drools:lhs"/>
+				<xs:element ref="drools:rhs"/>
+			</xs:sequence>
+			<xs:attribute name="name" type="xs:string" use="required"/>
+		</xs:complexType>
+        <!-- All rules must have unique names -->
+		<xs:key name="ruleName">
+			<xs:selector xpath="drools:rule"/>
+			<xs:field xpath="@name"/>
+		</xs:key>
+	</xs:element>
+    
+    <xs:element name="query">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element ref="drools:lhs"/>
+			</xs:sequence>
+			<xs:attribute name="name" type="xs:string" use="required"/>
+		</xs:complexType>
+        <!-- All rules must have unique names -->
+		<xs:key name="queryName">
+			<xs:selector xpath="drools:query"/>
+			<xs:field xpath="@name"/>
+		</xs:key>
+	</xs:element>
+
+    <xs:element name="rule-attribute">
+		<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:element name="import">
+		<xs:complexType>
+			<xs:attribute name="name" type="xs:string" use="required"/>
+		</xs:complexType>
+	</xs:element>
+    
+    <xs:element name="global">
+		<xs:complexType>
+			<xs:attribute name="type" type="xs:string" use="required"/>
+			<xs:attribute name="identifier" type="xs:string" use="required"/>
+		</xs:complexType>
+	</xs:element>
+	<xs:element name="function">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element maxOccurs="unbounded" minOccurs="0" ref="drools:parameter"/>
+				<xs:element name="body" type="xs:string"/>
+			</xs:sequence>
+			<xs:attribute name="name" type="xs:string" use="required"/>
+			<xs:attribute name="return-type" type="xs:string" use="required"/>
+		</xs:complexType>
+	</xs:element>
+	<xs:element name="parameter">
+		<xs:complexType>
+			<xs:attribute name="type" type="xs:string" use="required"/>
+			<xs:attribute name="identifier" type="xs:string" use="required"/>
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="rhs" type="xs:string"/>
+
+	<xs:element name="lhs">
+		<xs:complexType>
+			<xs:choice maxOccurs="unbounded" minOccurs="0">
+                <xs:element ref="drools:abstractConditionalElement"/>
+                <xs:element ref="drools:not"/>
+				<xs:element ref="drools:exists"/>
+				<xs:element ref="drools:pattern"/>
+
+                <xs:element ref="drools:eval"/>
+                <xs:element ref="drools:forall"/>
+			</xs:choice>
+		</xs:complexType>
+	</xs:element>
+
+    <!-- Restriction Conective  -->
+    <xs:element name="abstractRestrictionConnective" type="drools:restrictionElementType" abstract="true"/>
+    <xs:element name="abstractConditionalElement" type="drools:conditionalElementType" abstract="true"/>
+    <xs:element name="abstractConstraintConective" type="drools:constraintConnectiveElementType" abstract="true"/>
+    
+    <xs:complexType name="restrictionElementType" >
+        <xs:choice maxOccurs="unbounded" minOccurs="0">
+            <xs:element ref="drools:literal-restriction"/>
+            <xs:element ref="drools:variable-restriction"/>
+            <xs:element ref="drools:return-value-restriction"/>
+            <xs:element ref="drools:qualified-identifier-restriction"/>
+        </xs:choice>
+    </xs:complexType>
+
+    <xs:complexType name="conditionalElementType" >
+
+        <xs:choice maxOccurs="unbounded" minOccurs="0">
+            <xs:element ref="drools:not"/>
+            <xs:element ref="drools:exists"/>
+            <xs:element ref="drools:eval"/>
+            <xs:element ref="drools:pattern"/>
+        </xs:choice>
+    </xs:complexType>
+
+    <xs:complexType name="constraintConnectiveElementType" >
+        <xs:choice maxOccurs="unbounded" minOccurs="0">
+            <xs:element ref="drools:field-constraint"/>
+        </xs:choice>
+    </xs:complexType>
+
+    <xs:element name="and-restriction-connective" substitutionGroup="drools:abstractRestrictionConnective">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="drools:restrictionElementType">
+                    <xs:choice maxOccurs="unbounded" minOccurs="0" >
+                        <xs:element ref="drools:or-restriction-connective"/>
+                    </xs:choice>
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="or-restriction-connective" substitutionGroup="drools:abstractRestrictionConnective">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="drools:restrictionElementType">
+                    <xs:choice maxOccurs="unbounded" minOccurs="0" >
+                        <xs:element ref="drools:and-restriction-connective"/>
+                    </xs:choice>
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+
+
+    <!-- Conditional Element -->
+    <xs:element name="and-conditional-element" substitutionGroup="drools:abstractConditionalElement">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="drools:conditionalElementType">
+                    <xs:choice maxOccurs="unbounded" minOccurs="0" >
+                        <xs:element ref="drools:or-conditional-element"/>
+                    </xs:choice>
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="or-conditional-element" substitutionGroup="drools:abstractConditionalElement">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="drools:conditionalElementType">
+                    <xs:choice maxOccurs="unbounded" minOccurs="0" >
+                        <xs:element ref="drools:and-conditional-element"/>
+                    </xs:choice>
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+
+    <!-- Logical Connectives -->
+
+
+    <xs:element name="and-constraint-connective" substitutionGroup="drools:abstractConstraintConective">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="drools:constraintConnectiveElementType">
+                    <xs:choice maxOccurs="unbounded" minOccurs="0" >
+                        <xs:element ref="drools:or-constraint-connective"/>
+                    </xs:choice>
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="or-constraint-connective" substitutionGroup="drools:abstractConstraintConective">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="drools:constraintConnectiveElementType">
+                    <xs:choice maxOccurs="unbounded" minOccurs="0" >
+                        <xs:element ref="drools:and-constraint-connective"/>
+                    </xs:choice>
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>    
+
+
+    <xs:element name="not">
+		<xs:complexType>
+			<xs:choice maxOccurs="unbounded" minOccurs="1">
+                <xs:element ref="drools:abstractConditionalElement"/>
+
+                <xs:element ref="drools:not"/>
+                <xs:element ref="drools:exists"/>
+                <xs:element ref="drools:pattern"/>
+
+                <xs:element ref="drools:accumulate"/>
+                <xs:element ref="drools:collect"/>
+                <xs:element ref="drools:forall"/>
+            </xs:choice>
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="exists">
+		<xs:complexType>
+			<xs:choice maxOccurs="unbounded" minOccurs="0">
+                <xs:element ref="drools:pattern"/>
+                <xs:element ref="drools:abstractConditionalElement"/>
+
+                <xs:element ref="drools:accumulate"/>
+                <xs:element ref="drools:collect"/>
+                <xs:element ref="drools:forall"/>                
+            </xs:choice>
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="forall">
+		<xs:complexType>
+			<xs:choice maxOccurs="unbounded" minOccurs="0">
+				<xs:element ref="drools:pattern"/>
+			</xs:choice>
+		</xs:complexType>
+	</xs:element>
+
+    <xs:element name="collect">
+        <xs:complexType>
+            <xs:choice maxOccurs="1" minOccurs="1">
+                <xs:element ref="drools:pattern"/>
+            </xs:choice>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="expression" type="xs:string"/>
+
+    <xs:group name="accumulate">
+     <xs:sequence>
+        <xs:element ref="drools:pattern"/>
+        <xs:choice>
+            <xs:sequence>
+                <xs:element name="init" type="xs:string"/>
+                <xs:element name="action" type="xs:string"/>
+                <xs:element name="result" type="xs:string"/>
+            </xs:sequence>
+            <xs:element ref="drools:external-function"/>
+        </xs:choice>
+     </xs:sequence>
+    </xs:group>
+
+    <xs:element name="accumulate">
+        <xs:complexType>
+            <xs:choice maxOccurs="1" minOccurs="1">
+                <xs:group ref="drools:accumulate"/>
+            </xs:choice>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="from">
+        <xs:complexType>
+            <xs:choice maxOccurs="1">
+                <xs:element ref="drools:collect"/>
+                <xs:element ref="drools:expression"/>
+                <xs:element ref="drools:accumulate"/>
+            </xs:choice>
+        </xs:complexType>
+    </xs:element>
+
+	<xs:element name="eval" type="xs:string"/>
+
+    <xs:element name="pattern">
+		<xs:complexType>
+			<xs:choice maxOccurs="unbounded" minOccurs="0">
+				<xs:element ref="drools:field-binding"/>
+				<xs:element ref="drools:field-constraint"/>
+				<xs:element ref="drools:from"/>
+                <xs:element ref="drools:predicate"/>                
+                <xs:element ref="drools:abstractConstraintConective"/>                
+            </xs:choice>
+			<xs:attribute name="field-name" type="xs:string" use="optional"/>
+			<xs:attribute name="identifier" type="xs:string" use="optional"/>
+			<xs:attribute name="object-type" type="xs:string" use="required"/>
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="field-constraint">
+		<xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="drools:restrictionElementType">
+                    <xs:choice maxOccurs="unbounded" minOccurs="0" >
+                        <xs:element ref="drools:abstractRestrictionConnective"/>
+                    </xs:choice>
+                    <xs:attribute name="field-name" type="xs:string" use="required"/>
+                </xs:extension>
+            </xs:complexContent>
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="field-binding">
+		<xs:complexType>
+			<xs:attribute name="field-name" type="xs:string" use="required"/>
+			<xs:attribute name="identifier" type="xs:string" use="required"/>
+		</xs:complexType>
+	</xs:element>
+
+    <xs:element name="literal-restriction">
+		<xs:complexType>
+			<xs:attribute name="evaluator" type="xs:string" use="required"/>
+			<xs:attribute name="value" type="xs:string" use="required"/>
+		</xs:complexType>
+	</xs:element>
+
+
+	<xs:element name="external-function">
+		<xs:complexType>
+			<xs:attribute name="evaluator" type="xs:string" use="required"/>
+			<xs:attribute name="expression" type="xs:string" use="required"/>
+		</xs:complexType>
+	</xs:element>
+
+    <xs:element name="variable-restriction">
+		<xs:complexType>
+			<xs:attribute name="evaluator" type="xs:string" use="required"/>
+			<xs:attribute name="identifier" type="xs:string" use="required"/>
+		</xs:complexType>
+	</xs:element>
+
+	<xs:element name="return-value-restriction">
+		<xs:complexType>
+			<xs:simpleContent>
+				<xs:extension base="xs:string">
+					<xs:attribute name="evaluator" type="xs:string" use="required"/>
+				</xs:extension>
+			</xs:simpleContent>
+		</xs:complexType>
+	</xs:element>
+
+    <xs:element name="qualified-identifier-restriction">
+        <xs:complexType>
+            <xs:simpleContent>
+                <xs:extension base="xs:string">
+                    <xs:attribute name="evaluator" type="xs:string" use="required"/>
+                </xs:extension>
+            </xs:simpleContent>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="predicate">
+        <xs:complexType>
+			<xs:simpleContent>
+				<xs:extension base="xs:string">
+                    <xs:attribute name="field-name" type="xs:string" use="optional"/>
+                    <xs:attribute name="identifier" type="xs:string" use="optional"/>
+                </xs:extension>
+			</xs:simpleContent>
+        </xs:complexType>
+    </xs:element>
+
+</xs:schema>




More information about the jboss-svn-commits mailing list