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
        at
com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:
110)
        at
com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:
124)
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:
228)
        at
org.jopendocument.dom.template.engine.ScriptEngineDataModel._eval(Unknown
Source)
        ... 26 more

Sounds like if some definitions are missing in the source file, but
which ?

Thank's for help

Luc

Reply via email to