2.3.1.7 File Attachment Control

A file attachment control that is not required to contain data, which is bound to an XML element, for example named "field1", with data type set to "base64Binary" for which no constraining facets, as specified in [XMLSCHEMA1], have been set, has the following XSD:

 <xsd:element name="field1" nillable="true" type="xsd:base64Binary"/>

A file attachment control that is required to contain data, for example that is bound to an XML element named "field1", with data type set to "xsd:base64Binary" for which an xsd:minLength constraining facet, as specified in [XMLSCHEMA1], has been set, has the following XSD:

 <xsd:element name="field1" type="my:requiredBase64Binary"/>
 <xsd:simpleType name="requiredBase64Binary">
     <xsd:restriction base="xsd:base64Binary">
         <xsd:minLength value="1"/>
     </xsd:restriction>
 </xsd:simpleType>

A file attachment control SHOULD be bound to a field with the XSD data types base64Binary. Any valid constraining facets, as specified in [XMLSCHEMA1], MAY also be set.