Le 21/03/2011 12:29, Luc a écrit :
Hi,

I'm discovering jOpenDocument and have the following problem :

I use an odt "source file" with input fields.
th file is open as template and all fields are set with the method
"setfield" (no errors)
But, when I try to save the template in a new file, I get these
errors :

TemplateException
org.jopendocument.dom.template.TemplateException: pb while replacing
<text:span xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
text:description="SrsNum">1</text:span>
        at org.jopendocument.dom.template.engine.Processor.transform(Unknown
Source)
...
Caused by: org.jopendocument.dom.template.TemplateException: invalid
expression: "SrsNum"
        at org.jopendocument.dom.template.engine.DataModel.eval(Unknown
Source)
        at
org.jopendocument.dom.template.engine.Processor.replaceField(Unknown
Source)
        ... 24 more
Caused by: javax.script.ScriptException:
sun.org.mozilla.javascript.internal.EcmaError: ReferenceError:
"SrsNum" n'est pas défini (<Unknown source>#1) in<Unknown source>  at
line number 1

It seems that you reference a variable in your odt that you haven't defined in Java. Maybe you meant "SrcNum" ?

HTH,
Sylvain

Reply via email to