See http://drools.org/Schema+Validation

[]´s

Antonio

-----Mensagem original-----
De: Anagha [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 13 de dezembro de 2005 05:05
Para: [email protected]
Assunto: [drools-user] Not able to use : @DroolsRule


Hi,
I'm using drools-annotation without spring (drools 2.0) and I've used "
drools-annotation-2.0.jar". I'm trying a simple program like this:
RuleBase ruleBase = RuleBaseLoader.loadFromUrl(
                    HelloAnno.class.getResource( "HelloAnn.drl" ) );
            WorkingMemory workingMemory = ruleBase.newWorkingMemory( );
            workingMemory.addEventListener(
                new DebugWorkingMemoryEventListener( ) );
            workingMemory.assertObject( "Hello" );
            workingMemory.fireAllRules( );

and my drl file is like this :
<rule-set name="newRules" >
    <annotation:rule name="NewRule" salience="10"
        class="demo.HelloAnno" />
</rule-set>

I'm getting the errors :
(file:/usr/local/anagha/ecl32-workspace/drools-nospring/demo/HelloAnn.drl:
1, 28): cvc-elt.1: Cannot find the declaration of element 'rule-set'.
(file:/usr/local/anagha/ecl32-workspace/drools-nospring/demo/HelloAnn.drl:
3, 34): The prefix "annotation" for element "annotation:rule" is not bound.
org.xml.sax.SAXParseException: The prefix "annotation" for element
"annotation:rule" is not bound.
    at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)

The error is of SAXParser. I'm using "xercesimple-2.6.2.jar" and "
xml-apis-1.0.b2.jar" in the build path.

What is the thing I'm missing out?

Any help is welcome.
--
Thanks & Regards,
Anagha

- - - - -

Politica de Privacidade: Esta mensagem pode conter informacao confidencial e/ou 
privilegiada. Se voce nao for o destinatario ou a pessoa autorizada a receber 
esta mensagem, nao pode usar, copiar ou divulgar as informacoes nela contidas 
ou tomar qualquer acao baseada nessas informacoes. Se voce recebeu esta 
mensagem por engano, por favor avise imediatamente o remetente, respondendo o 
e-mail e em seguida apague-o. Agradecemos sua cooperacao.

Privacy Policy: This message may contain confidential and/or privileged 
information. If you are not the addressee or authorized to receive this for the 
addressee, you must not use, copy, disclose or take any action based on this 
message or any information herein. If you have received this message in error, 
please advise the sender immediately by reply e-mail and delete this message. 
Thank you for your cooperation.

Reply via email to