W3C home > Mailing lists > Public > www-forms@w3.org > July 2006

Re: controls restricted to certain bound types

From: Aaron Reed <aaronr@us.ibm.com>
Date: Thu, 27 Jul 2006 12:26:04 -0500
To: www-forms@w3.org
Message-ID: <eaasvo$emp$1@sea.gmane.org>

I have a followup question, too.  What about unions?

What if I have:
     <xsd:simpleType name="selectedfilename">
           <xsd:restriction base='anyURI'/>
           <xsd:restriction base='string'/>

Can a xf:upload be bound to a node of type selectedfilename?  Does the 
upload only show when the type is valid under anyURI but not when it is 
string (even though the value is schema valid)?

Any input appreciated,

Aaron Reed wrote:
> Hi,
> I have a question about the 1.0 spec.  It says that inputs, ranges and 
> uploads all have limitations as to the types of data that they can bind 
> to.  xf:input is spelled out pretty clearly...it can only bind to 
> simpleContent that is NOT xsd:base64Binary or xsd:hexBinary or derived 
> from them.
> However upload and range do NOT have the simpleContent rule.    For 
> example, upload says, "This form control can only be bound to datatypes 
> xsd:anyURI, xsd:base64Binary or xsd:hexBinary, or types derived by 
> restriction from these."  Is this just simpleContent restriction or does 
> this include complexContent restriction?  Also why can't I bind to a 
> node with a complex type that uses simpleContent extension?  Like:
> <xs:complexType name="myType">
>   <xs:simpleContent>
>     <xs:extension base="xs:anyURI">
>       <xs:attribute name="filename" type="xs:string"/>
>       <xs:attribute name="mediatype" type="xs:string"/>
>     </xs:extension>
>   </xs:simpleContent>
> </xs:complexType>
> Any clarification appreciated.
> Thanks,
> --Aaron
Received on Friday, 28 July 2006 14:10:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:18 UTC