Re: [Xsltforms-support] Exception caused by null namespace declaration on xf:instance
Brought to you by:
alain-couthures
From: Ihe O. <ihe...@gm...> - 2012-12-18 12:54:36
|
On Tue, Dec 18, 2012 at 12:01 PM, Ihe Onwuka <ihe...@gm...> wrote: > Rev 559. > > <xf:instance id="biff" xmlns=""> > {$xQueryVariable} > </xf:instance> > > leads to the following exception. > > > XSLTForms Exception > -------------------------- > > Incorrect Javascript code generation: > > xsltforms_init@http://localhost:8080/exist/rest//db/apps/clinsys/crypto.xq:2 > onload@http://localhost:8080/exist/rest//db/apps/clinsys/crypto.xq:1 > > > ReferenceError > > xsltforms_initImpl is not defined > > <xf:instance id="biff"> > <root xmlns="">{$xQueryVariable}</root> > </xf:instance> > > works fine. I've figured out what is going on here, and it is my error and it serves as a reminder of the perils of not putting instance data in it's own namespace. The actual scenarion leading to the problem is <model xmlns:xf="http://www.w3.org/2002/xforms"> <instance id="biff" xmlns=''"> which takes the instance declaration out of the XForms namespace and causes the error. Note this would not have happened if I had put my instance data in a namespace (well I wanted to but that is not how the data comes). So the remaining issue is whether it is nice for XSLTForms to give a Javascript exception in this circumstance. |