Thanks Wolfgang, but i don-t understand.
do you mean use the function to translate all the files, between the front/backMatter calls? But for me to create a printer i need to pass the FileReader i want to print. I'm using the following function to print the files. Could you explain me your idea, exemplifying with this code?

public void printAFile(String jessfile) throws IOException, JessException{
       FileReader fr = new FileReader(jessfile);
       String xmlFile=jessfile.replace(".clp", ".xml");
       FileWriter fw=new FileWriter(xmlFile);
       XMLPrinter printer = new XMLPrinter(new PrintWriter(fw, true));
       try {
           printer.printFrontMatter();
           printer.translateToXML(fr);
           printer.printBackMatter();
       } finally {
           printer.close();
       }
   }

Regards,

Joao



Thanks again,

Joao

On 30-03-2009 16:57, Wolfgang Laun wrote:
Try to use the methods of jess.xml.XmlPrinter, calling translateToXml for each of your .clp files, in a sequence honouring the dependencies, and this suitably enclosed in front/backMatter calls.

XmlPrinter "dumps" what is in the Engine; so you cannot translate incomplete XML.

-W


On Mon, Mar 30, 2009 at 3:34 PM, Joao Antunes Mourao <[email protected] <mailto:[email protected]>> wrote:

    Hello,

    I'm trying to pass my rules files written in jess syntax into XML.
    I heard about the JessML tool to convert these. However, i'm find
    some problems with this.

    I have a number of rules files, .clp, which are connected through
    the procedure require/provide. When i try to use the JessML, it
    gives me errors, saying that for some template the slot is not
    defined. The reason for that is that the template is defined in
    some other file. But again, JessML should know about this
    template, since there is a require statement before, in where the
    templates are defined.

    Does the JessML handles the require/provide statement?

    Regards,

    Joao

    --------------------
    unclassified email


    
------------------------------------------------------------------------------------------------------------
    Disclaimer:

    If you are not the intended recipient of this email, please notify
    the sender and delete it. Any unauthorized copying, disclosure or
    distribution of this email or its attachment(s) is forbidden.
    Thales Nederland BV will not accept liability for any damage
    caused by this email or its attachment(s). Thales Nederland BV is
    seated in Hengelo and is registered at the Chamber of Commerce
    under number 06061578.
    
------------------------------------------------------------------------------------------------------------




------------------------------------------------------------------------------------------------------------
Disclaimer:

If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578.
------------------------------------------------------------------------------------------------------------

begin:vcard
fn;quoted-printable:Jo=C3=A3o Mour=C3=A3o
n;quoted-printable;quoted-printable:Mour=C3=A3o;Jo=C3=A3o
org:Thales;Above Water Systems
adr:;;;Hengelo;;;Netherlands
email;internet:[email protected]
title:THALES NETHERLANDS B.V.
tel;work:2640
note:-unclassified mail-
version:2.1
end:vcard

Reply via email to