Quantcast

Error: XForms Error (33): Could not find default instance

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error: XForms Error (33): Could not find default instance

Adrian Apthorp-2
I'm trying to use the Mozilla xforms plugin (0.8.7) for a Lightning
add-on I've created and get the following error:

Error: XForms Error (33): Could not find default instance

The error is reporting at line 0 of my XUL form. The xform itself
works fine if I open it in Firefox.

What is the 'default instance' this error refers to?
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: XForms Error (33): Could not find default instance

Philipp Wagner-4
Am 29.01.2011 12:21, aapthorp wrote:
> I'm trying to use the Mozilla xforms plugin (0.8.7) for a Lightning
> add-on I've created and get the following error:
>
> Error: XForms Error (33): Could not find default instance
>
> The error is reporting at line 0 of my XUL form. The xform itself
> works fine if I open it in Firefox.
>
> What is the 'default instance' this error refers to?

The default instance is the instance that's initially loaded when you
load the form. It's stored in the <instance> tag inside the model. Do
you load this instance from an external file (using the src attribute)?
Perhaps it's a problem with a relative file path?

That's all I can guess right now, if it still does not work please
include a relevant part of your form in your next message.


Philipp
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: XForms Error (33): Could not find default instance

Adrian Apthorp-2
On Jan 30, 5:15 pm, Philipp Wagner <[hidden email]> wrote:

> Am 29.01.2011 12:21, aapthorp wrote:
>
> > I'm trying to use the Mozilla xforms plugin (0.8.7) for a Lightning
> > add-on I've created and get the following error:
>
> > Error: XForms Error (33): Could not find default instance
>
> > The error is reporting at line 0 of my XUL form. The xform itself
> > works fine if I open it in Firefox.
>
> > What is the 'default instance' this error refers to?
>
> The default instance is the instance that's initially loaded when you
> load the form. It's stored in the <instance> tag inside the model. Do
> you load this instance from an external file (using the src attribute)?
> Perhaps it's a problem with a relative file path?
>
> That's all I can guess right now, if it still does not work please
> include a relevant part of your form in your next message.
>
> Philipp

Philipp,

That's what I thought, but the instance is contained within the xform.
Indeed I've tested against a couple of example xforms and get the same
error. Excerpts below:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/
2002/xforms">



<head>

  <xf:model>

    <xf:instance>

      <person>

        <fname/>

        <lname/>

      </person>

    </xf:instance>

    <xf:submission id="form1" method="get" action="submit.asp"/>

  </xf:model>

</head>

etc.

and

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/
2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema">

                <xf:model id="myModel">

                        <xf:instance id="instance1">

                                <data xmlns="">

                                        <first-name />

                                        <last-name />

                                        <DayOfWeek>monday</DayOfWeek>

                                        <MyDate />

                                </data>

                        </xf:instance>

                        <xf:bind nodeset="MyDate" type="xs:date" />

                </xf:model>

etc.

I'm guessing the problem has something to do with how I'm loading the
xform, basically
in to a XUL div element by setting innerHTML. The form (and other
HTML) seems to render OK apart from this error with default instance.

Thoughts?

Adrian

_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: XForms Error (33): Could not find default instance

Philipp Wagner-4
Am 31.01.2011 20:01, aapthorp wrote:
> I'm guessing the problem has something to do with how I'm loading the
> xform, basically
> in to a XUL div element by setting innerHTML. The form (and other
> HTML) seems to render OK apart from this error with default instance.

Hm, certainly not the common use case :) Are you able to put together a
HTML or XUL testcase that shows the problem without Lighting and
Thunderbird? That would help me a lot. Otherwise you'd need to do a
debug build of XForms and see where the problem is yourself.

Or you could just put the form inside an iframe instead of a div?

Philipp

PS: Your use case sounds interesting. Is it related to
http://adullact.net/plugins/mediawiki/wiki/milimail/index.php/Mail_XForms ?
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: XForms Error (33): Could not find default instance

Adrian Apthorp-2
On Jan 31, 9:14 pm, Philipp Wagner <[hidden email]> wrote:

> Am 31.01.2011 20:01, aapthorp wrote:
>
> > I'm guessing the problem has something to do with how I'm loading the
> > xform, basically
> > in to a XUL div element by setting innerHTML. The form (and other
> > HTML) seems to render OK apart from this error with default instance.
>
> Hm, certainly not the common use case :) Are you able to put together a
> HTML or XUL testcase that shows the problem without Lighting and
> Thunderbird? That would help me a lot. Otherwise you'd need to do a
> debug build of XForms and see where the problem is yourself.
>
> Or you could just put the form inside an iframe instead of a div?
>
> Philipp
>
> PS: Your use case sounds interesting. Is it related tohttp://adullact.net/plugins/mediawiki/wiki/milimail/index.php/Mail_XF...?

Yes, it's similar. Indeed I used one of the sample forms as a test.
I've been playing with the idea of extending calendar entries with
task specific forms / data as part of an experimental project.

http://taskcal.sourceforge.net/

I went with the div option as I'm retrieving the form from the
calendar entry for now. I'll try with an iframe and see if I get the
same error.

Adrian
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: XForms Error (33): Could not find default instance

Adrian Apthorp-2
On Jan 31, 9:32 pm, aapthorp <[hidden email]> wrote:

> On Jan 31, 9:14 pm, Philipp Wagner <[hidden email]> wrote:
>
>
>
> > Am 31.01.2011 20:01, aapthorp wrote:
>
> > > I'm guessing the problem has something to do with how I'm loading the
> > > xform, basically
> > > in to a XUL div element by setting innerHTML. The form (and other
> > > HTML) seems to render OK apart from this error with default instance.
>
> > Hm, certainly not the common use case :) Are you able to put together a
> > HTML or XUL testcase that shows the problem without Lighting and
> > Thunderbird? That would help me a lot. Otherwise you'd need to do a
> > debug build of XForms and see where the problem is yourself.
>
> > Or you could just put the form inside an iframe instead of a div?
>
> > Philipp
>
> > PS: Your use case sounds interesting. Is it related tohttp://adullact.net/plugins/mediawiki/wiki/milimail/index.php/Mail_XF...
>
> Yes, it's similar. Indeed I used one of the sample forms as a test.
> I've been playing with the idea of extending calendar entries with
> task specific forms / data as part of an experimental project.
>
> http://taskcal.sourceforge.net/
>
> I went with the div option as I'm retrieving the form from the
> calendar entry for now. I'll try with an iframe and see if I get the
> same error.
>
> Adrian

I can report that using an iframe works. Hmm, what are the chances of
getting this fixed in div?
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: XForms Error (33): Could not find default instance

Philipp Wagner-4
Am 31.01.2011 22:07, aapthorp wrote:
> I can report that using an iframe works.

Great!

> Hmm, what are the chances of
> getting this fixed in div?

Probably, but I'd need a testcase that shows the problem without
Thunderbird and Lighting. It's quite possible this behavior is
reproducible in a plain XUL file that runs in Firefox. If you can get
such a testcase together I'll have a look at it.

Philipp
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error: XForms Error (33): Could not find default instance

Adrian Apthorp-2
On Jan 31, 10:16 pm, Philipp Wagner <[hidden email]> wrote:

> Am 31.01.2011 22:07, aapthorp wrote:
>
> > I can report that using an iframe works.
>
> Great!
>
> > Hmm, what are the chances of
> > getting this fixed in div?
>
> Probably, but I'd need a testcase that shows the problem without
> Thunderbird and Lighting. It's quite possible this behavior is
> reproducible in a plain XUL file that runs in Firefox. If you can get
> such a testcase together I'll have a look at it.
>
> Philipp

I have a testcase that fails in Firefox but no error is shown in the
Firefox console. The following displays the form but doesn't handle
the input.

XUL file:

<?xml version="1.0" encoding="UTF-8" ?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/
there.is.only.xul"
    title="Task Form"
        xmlns:html="http://www.w3.org/1999/xhtml" onload="onLoad()"
buttons="accept,cancel"
        ondialogaccept="return onAccept();" ondialogcancel="return
onCancel();"
        buttonlabelcancel="Cancel" buttonlabelaccept="OK">

        <script src="chrome://xforms-div/content/form-dialog.js"
type="application/javascript" />

        <vbox id="form-box" flex="1">
                <html:div id="my_html_elem"></html:div>
        </vbox>

</dialog>

Javascript file:

function onLoad() {

        var myForm = '<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:xf=
\"http://www.w3.org/2002/xforms\">\
        <head>\
           <title>Hello World in XForms</title>\
           <xf:model><xf:instance xmlns=\"\"><data><first-name/></data></
xf:instance></xf:model>\
        </head>\
        <body><p>Type in your name in the input field box. <br/>If you
are running XForms, the output should be displayed in the output
area.</p>\
          <xf:input ref=\"first-name\" incremental=\"true\">\
          <xf:label>Please enter your first name: </xf:label>\
          </xf:input><br />\
          <xf:output value=\"concat(\'Hello  \', first-name , \'. We hope you
like XForms!\')\"><xf:label>Output: </xf:label></xf:output>\
        </body>\
        </html>';
        alert(myForm);
        document.getElementById("my_html_elem").innerHTML = myForm;
}

function onAccept() {
        return true;
}

function onCancel() {
        return true;
}

The xform works fine when I load the html/xform directly in to the
browser from a file.
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Loading...