17.06.2013 Views

XMP Specification Part 3: Storage in Files - Adobe

XMP Specification Part 3: Storage in Files - Adobe

XMP Specification Part 3: Storage in Files - Adobe

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• When there is more than one <strong>XMP</strong> packet <strong>in</strong> a file, it may be impossible to determ<strong>in</strong>e which is the “ma<strong>in</strong>”<br />

<strong>XMP</strong>, and what the overall resource conta<strong>in</strong>ment hierarchy is <strong>in</strong> a compound document.<br />

• Some packets could be obsolete. For example, PDF files allow <strong>in</strong>cremental saves. Therefore, when<br />

changes are made to the document, there might be multiple packets, only one of which reflects the current<br />

state of the file.<br />

1.2.1 Scann<strong>in</strong>g h<strong>in</strong>ts<br />

A file should be scanned byte-by-byte until a valid header is found. First, the scanner should look for a byte<br />

pattern that represents the text<br />

<br />

The scanner is now ready to read the value of the beg<strong>in</strong> attribute, followed by the clos<strong>in</strong>g quote character:<br />

UTF-8 0xEF 0xBB 0xBF<br />

UTF-16, big-endian 0xFE 0xFF<br />

UTF-16, little-endian 0xFF 0xFE<br />

UTF-32, big-endian 0x00 0x00 0xFE 0xFF<br />

UTF-32, little-endian 0xFF 0xFE 0x00 0x00<br />

If the attribute has no value (that is, the value is the empty str<strong>in</strong>g), the encod<strong>in</strong>g is UTF-8.<br />

12 ©<strong>Adobe</strong> Systems Incorporated, 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!