Data type not honored for attribute nodes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Data type not honored for attribute nodes

Philipp Wagner-3
Hi,

I am using XForms together with XUL and have code like that:

<xf:input ref="//element/@some-attribute">
  <xf:label>test</xf:label>
</xf:input>

In an external schema file (but it's the same when I specify it inline),
the attribute is defined to be of type xsd:boolean, like that:

<xsd:element name="element">  
<xsd:complexType>
    <xsd:simpleContent>
      <xsd:extension base="xsd:integer">
        <xsd:attribute name="some-attribute" type="xsd:boolean"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
</xsd:element>

If I define xsd:boolean as type for an element, I get a single checkbox
as it should be.
But if I specify an attribute node as ref, the data type is ignored and
it displays an input box for all data types (I can specify whatever I
want, I always get a simple text box).

Is this a bug or simply not possible?

Thanks for your help!

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

Re: Data type not honored for attribute nodes

Steve Speicher
Hi Philipp,

It appears to be due to bug
https://bugzilla.mozilla.org/show_bug.cgi?id=310962

You can get around this by binding a type directly to the attribute such as:

  <xforms:bind nodeset="@some-attribute" type="xsd:boolean" />

If this bug is a real inhibitor, I can attempt to move this patch along a
little faster.

Regards,
Steve

On 9/7/07, Philipp Wagner <[hidden email]> wrote:

>
> Hi,
>
> I am using XForms together with XUL and have code like that:
>
> <xf:input ref="//element/@some-attribute">
>   <xf:label>test</xf:label>
> </xf:input>
>
> In an external schema file (but it's the same when I specify it inline),
> the attribute is defined to be of type xsd:boolean, like that:
>
> <xsd:element name="element">
> <xsd:complexType>
>     <xsd:simpleContent>
>       <xsd:extension base="xsd:integer">
>         <xsd:attribute name="some-attribute" type="xsd:boolean"/>
>       </xsd:extension>
>     </xsd:simpleContent>
>   </xsd:complexType>
> </xsd:element>
>
> If I define xsd:boolean as type for an element, I get a single checkbox
> as it should be.
> But if I specify an attribute node as ref, the data type is ignored and
> it displays an input box for all data types (I can specify whatever I
> want, I always get a simple text box).
>
> Is this a bug or simply not possible?
>
> Thanks for your help!
>
> Philipp
> _______________________________________________
> dev-tech-xforms mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-xforms
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: Data type not honored for attribute nodes

Philipp Wagner-3
On Friday 07 September 2007 21:48, Steve Speicher wrote:

> Hi Philipp,
>
> It appears to be due to bug
> https://bugzilla.mozilla.org/show_bug.cgi?id=310962
>
> You can get around this by binding a type directly to the attribute
> such as:
>
>   <xforms:bind nodeset="@some-attribute" type="xsd:boolean" />
>
> If this bug is a real inhibitor, I can attempt to move this patch
> along a little faster.

This would be great. I am no C-coder, I probably could only do the
code-cleanups mentioned in the bugfix, but I have no idea about the
internals of mozilla code for any work other than that.

I am really dependant on external schemas as it simplifies the
development much (I'm doing many forms for existing schemas and having
to do all these binds would make this much more work).

So I would be really greatful for a fast bugfix, and tell me what I can
do, I'll happy to help out with what I can do.

Thanks!

Philipp
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms