32 September 2005 XMP Specification XMP Storage Model XMP Packet Wrapper 3 An XMP Packet must conform to the Well-Formedness requirements of the XML specification, except for the lack of an XML declaration at its start. Different packets in a file can be in different character encodings, and packets must not nest. The following sections describe the parts of the packet illustrated above. Header The header is an XML processing instruction of the form: ?xpacket ... ? The processing instruction contains information about the packet in the form of XML attributes. There are two required attributes: begin and id, in that order. Other attributes can follow in any order unrecognized attributes should be ignored. Attributes must be separated by exactly one ASCII space (U+0020) character. NOTE: The astute reader might note that XML processing instructions do not actually contain “attributes”, they formally have an undifferentiated text body. The term attribute is used here colloquially to denote the general syntax of the xpacket processing instruction’s body. Attribute: begin This required attribute indicates the beginning of a new packet. Its value is the Unicode zero- width non-breaking space character U+FEFF, in the appropriate encoding (UTF-8, UTF-16, or UTF-32). It serves as a byte-order marker, where the character is written in the natural order of the application (consistent with the byte order of the XML data encoding). For backward compatibility with earlier versions of the XMP Packet specification, the value of this attribute can be the empty string, indicating UTF-8 encoding. “Scanning Files for XMP Packets” on page 34 describes how an XMP Packet processor should read a single byte at a time until it has successfully determined the byte order and encoding. Attribute: id The required id attribute must follow begin. For all packets defined by this version of the syntax, the value of id is the following string: W5M0MpCehiHzreSzNTczkc9d Attribute: bytes NOTE: This attribute is deprecated. The optional bytes attribute specifies the total length of the packet in bytes, which was intended to allow faster scanning of XMP Packets. It was of minimal actual value, and would not work properly in text files.
Previous Page Next Page