Files
vectorcraft/crates
dotCooCoo 8cc1bc8530 Scripts: ExternalObject loads the XMP objects XMPMeta, XMPFile and XMPConst
new ExternalObject("lib:AdobeXMPScript") defines XMPMeta, XMPFile and
XMPConst in the script engine; any other library name throws and no
native library is loaded.

- XMPMeta reads a packet string and serializes one, with or without the
  packet wrapper: simple properties, arrays of simple items, language
  alternatives and namespace registration and lookup. Structures and
  values with qualifiers are kept as they were written.
- XMPFile reads and writes only where File may. A .xmp sidecar opened
  for update takes putXMP, and closeFile writes it through a temporary
  file in the same folder when the script may write there; other files
  are scanned for their packet and are read only. File's 8 MiB limit
  applies before reading.
- Packets are parsed with craft-xml: a document type declaration, an
  undefined entity, nesting over 64 levels and a packet over 8 MiB are
  refused with an error.
- Members not built yet (iterators, structure fields, qualifiers,
  aliases, sorting, byte-array packets, XMPFile.getFormatInfo) throw
  that they are not available yet.

The XMPConst flag values follow the public XMP Toolkit SDK header
XMP_Const.h. Tests: crates/js/src/xmp_tests.rs, with fuzz cases for the
packet parser and scanner, and crates/engine/src/tests/script_xmp.rs.
Docs: docs/mcp.md and docs/target-app-parity.md.
2026-11-22 06:11:31 -08:00
..