HOME XML-SCHEMA XML-EXAMPLES CHESS VARIANTS FBR MBN ANCP FAQ RESOURCES ABOUT

CIF - BLOb


<xs:complexType name="BLOb"> <xs:simpleContent> <xs:extension base="Base91Binary"> <xs:attribute name="name" type="Token"/> <xs:attribute name="mimetype" type="MimeType" use="required"/> <xs:attribute name="compression" type="Compression" use="required"/> <xs:attribute name="size" type="xs:positiveInteger" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> <xs:simpleType name="Base91Binary"> <xs:restriction base="xs:string"> <xs:pattern value="[!#-;=?-~]*"/> </xs:restriction> </xs:simpleType>

A BLOb (Binary Large Object) is a container for binary data. Despite the name a BLOb must not be large. Because a XML file is a human readable text file, the binary data will be encoded with basE91x (a XML friendly encoding derived from basE91). The C/CIF library will do the encoding and decoding.

Attribute size must be set to the size of the raw (uncompressed, unencoded) binary data.

Attribute name serves as a reference identifier.

Note that the basE91x encoded string will be enclosed inside a CDATA element (this ensures that the ampersand character is escaped), and this cannot be expressed in XML schema.

<xs:simpleType name="Compression"> <xs:restriction base="xs:string"> <xs:enumeration value="zlib"/> <xs:enumeration value="none"/> </xs:restriction> </xs:simpleType>

Currently only the zlib compression method is known. It's the responsibility of the user to compress/decompress the data, the C/CIF library is not doing any transformation except the encoding/decoding to and from basE91x.



Google translation

Share this page

C/CIF at Sourceforge

C/CIF at Sourceforge

C/CIF at Launchpad

C/CIF at Launchpad