Hi ,
 
I am trying to implement drools with XML
 
My XML file is:
 

<?

xml version="1.0" encoding="UTF-8"?>

<rule-set

name="Get authorized users"

description="Rules to retrieve authorized users"

xmlns="http://drools.org/rules"

xmlns:java="http://drools.org/semantics/java"

xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"

xs:schemaLocation="http://drools.org/rules rules.xsd

http://drools.org/semantics/java java.xsd"

>

<

rule name="FlagAsUndervalued">

<

parameter identifier="person">

<

java:class>com.sample.Person</java:class>

</

parameter>

<

java:condition>person.getAge()>18</java:condition>

<

java:consequence>

System.out.println("Hello");

</

java:consequence>

</

rule>

</

rule-set>

And the errors are:

(null: 9, 72): schema_reference.4: Failed to read schema document 'rules.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

 

Exception in thread "main"

(null: 9, 72): cvc-elt.1: Cannot find the declaration of element 'rule-set'.

(null: 10, 32): schema_reference.4: Failed to read schema document 'rules.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

Please resolve this issue

 

Thanks & Regars,

Anusha