Closed Bug 329080 Opened 18 years ago Closed 18 years ago

Upload "type" attribute always detected as bound to wrong datatype

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: mozilla.org, Assigned: aaronr)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

I have specified xmlns:xsd="http://www.w3.org/2001/XMLSchema" in the "html" element, and used @type on the file bind in question. FF doesn't handle this, and says the datatype is xsd:string. Trying to hardcode the datatype in the upload control doesn't help. Can someone please point me to an example of a working "upload" element?

Here's the error message:
Error: XForms Error (28): Upload element not bound to valid datatype.  Must be bound to datatype 'xsd:anyURI', 'xsd:base64Binary', or 'xsd:hexBinary'.
Source File: file:///C:/LIMO-dev/install/XForms/jobs.xhtml?flavor=jumperInterconnect
Line: 0
Source Code:
<xf:upload bind="file-bind" mediatype="*" type="xsd:anyURI" type="http://www.w3.org/2001/XMLSchema#string"/>

http://isscvs.cern.ch/cgi-bin/viewcvs-all.cgi/install/XForms/jobs.xhtml?cvsroot=moi&only_with_tag=mozilla_plugin contains an example XForms.

Reproducible: Always

Steps to Reproduce:
Attached file Working upload example
(In reply to comment #0)
> <xf:upload bind="file-bind" mediatype="*" type="xsd:anyURI"
> type="http://www.w3.org/2001/XMLSchema#string"/>

It is not the control that needs to be "typed" but the instance data it is bound to.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → INVALID
(In reply to comment #2)
> (In reply to comment #0)
> > <xf:upload bind="file-bind" mediatype="*" type="xsd:anyURI"
> > type="http://www.w3.org/2001/XMLSchema#string"/>
> 
> It is not the control that needs to be "typed" but the instance data it is
> bound to.

That is already typed:
<xf:bind id="file-bind" nodeset="instance('file')/file" type="xsd:anyURI" relevant="string-length(instance('context')/slotId/text()) &gt; 0 and string-length(instance('context')/jobDescription/text()) &gt; 0"/>
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #0)
> > > <xf:upload bind="file-bind" mediatype="*" type="xsd:anyURI"
> > > type="http://www.w3.org/2001/XMLSchema#string"/>
> > 
> > It is not the control that needs to be "typed" but the instance data it is
> > bound to.
> 
> That is already typed:
> <xf:bind id="file-bind" nodeset="instance('file')/file" type="xsd:anyURI"
> relevant="string-length(instance('context')/slotId/text()) &gt; 0 and
> string-length(instance('context')/jobDescription/text()) &gt; 0"/>

Well, I could not see that in code that you pasted on the bug. You are sure that you are not getting any other error messages?

Does attachment 213737 [details] work for you?
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > (In reply to comment #0)
> > > > <xf:upload bind="file-bind" mediatype="*" type="xsd:anyURI"
> > > > type="http://www.w3.org/2001/XMLSchema#string"/>
> > > 
> > > It is not the control that needs to be "typed" but the instance data it is
> > > bound to.
> > 
> > That is already typed:
> > <xf:bind id="file-bind" nodeset="instance('file')/file" type="xsd:anyURI"
> > relevant="string-length(instance('context')/slotId/text()) &gt; 0 and
> > string-length(instance('context')/jobDescription/text()) &gt; 0"/>
> 
> Well, I could not see that in code that you pasted on the bug. You are sure
> that you are not getting any other error messages?
> 
> Does attachment 213737 [details] [edit] work for you?

There are two versions in CVS: In the oldest one, the type is just "anyURI", which works in Chiba. The newest one has the type "xsd:anyURI". Neither of them work.

Your example, however, works just fine, so I guess the problem is somewhere in the bind handling. The other difference is that you define the xsi and xsd namespaces in other places.

I also get the following error, but it should be unrelated:
Error: XForms Error (6): Error evaluating nodeset expression: jobs:Description
Source File: file:///C:/download/install/XForms/jobs.xhtml
Line: 0
Source Code:
<xf:bind id="job-description-bind" nodeset="jobs:Description"/>
(In reply to comment #5)
> I also get the following error, but it should be unrelated:
> Error: XForms Error (6): Error evaluating nodeset expression: jobs:Description
> Source File: file:///C:/download/install/XForms/jobs.xhtml
> Line: 0
> Source Code:
> <xf:bind id="job-description-bind" nodeset="jobs:Description"/>

And there I think you are wrong :)

I'm pretty sure we bail if we fail to evaluate a nodeset expression for a bind, so that will make the form unusable... try fixing all errors in your form first.
OK, that fixed it. Now nothing works, but at least there are no error messages :)
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: