Re: controls restricted to certain bound types

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

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

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

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