I have a schema for XML docs in which I need to handle embedded binary files. I defined it with mime/base64 encoding and am looking for advice about whether this is the right approach to handle this: <xs:complexType name="AttachedFile"> <xs:sequence> <xs:element name="FileName" type="xs:string"> <xs:annotation> <xs:documentation>Name of the attached file</xs:documentation> </xs:annotation> </xs:element> <xs:element name="Description" type="xs:string" minOccurs="0"> <xs:annotation> <xs:documentation>Description of the attached file</xs:documentation> </xs:annotation> </xs:element> <xs:element name="DateAttached" type="xs:dateTime" minOccurs="0"> <xs:annotation> <xs:documentation>Date that the file was attached to the application</xs:documentation> </xs:annotation> </xs:element> <xs:element name="File" type="xs:base64Binary" minOccurs="0"> <xs:annotation> <xs:documentation>The attached file in MIME (base64) encoded format</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> Thanks! AdamM
Adam M wrote: > I have a schema for XML docs in which I need to handle embedded binary files. > I defined it with mime/base64 encoding and am looking for advice about > whether this is the right approach to handle this: > <xs:element name="File" type="xs:base64Binary" minOccurs="0"> > <xs:annotation> > <xs:documentation>The attached file in MIME (base64) encoded > format</xs:documentation> > </xs:annotation> > </xs:element> That schema snippet looks all right to me. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/