Skip to content

Commit 6578812

Browse files
committed
Handle indexed/structured lang-alt XMP properties
Extend XMP portable dump support for additional structured shapes: bounded indexed-structured properties and structured child lang-alt properties. Added parsing helpers (parse_indexed_structured_xmp_property_name, parse_structured_lang_alt_xmp_property_name, parse_indexed_structured_lang_alt_xmp_property_name), new Portable* structs to represent structured/lang-alt/indexed items, and claim maps + helpers to track ownership. Implemented emission routines to correctly serialize structured lang-alt children, structured groups, and indexed-structured groups preserving order and language qualifiers. Also register additional namespaces (plus, Iptc4xmpExt) when present in existing XMP and updated grouping/sorting logic and callers in dump_xmp_portable to collect and emit these new property shapes. Tests updated accordingly.
1 parent b1d972a commit 6578812

5 files changed

Lines changed: 2118 additions & 77 deletions

File tree

src/include/openmeta/xmp_dump.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,11 @@ struct XmpPortableOptions final {
8484
/// Include \ref MetaKeyKind::XmpProperty entries already present in the store.
8585
///
8686
/// \note Currently simple `property_path` values, indexed `[n]` paths,
87-
/// bounded lang-alt paths like `title[@xml:lang=x-default]`, and
88-
/// bounded one-level structured paths like
89-
/// `CreatorContactInfo/CiEmailWork` are emitted.
87+
/// bounded lang-alt paths like `title[@xml:lang=x-default]`, bounded
88+
/// one-level structured paths like `CreatorContactInfo/CiEmailWork`,
89+
/// bounded indexed-structured paths like `Licensee[1]/LicenseeName`, and
90+
/// bounded structured child lang-alt paths like
91+
/// `CreatorContactInfo/CiAdrCity[@xml:lang=x-default]` are emitted.
9092
bool include_existing_xmp = false;
9193
/// Existing XMP namespace writeback policy for portable output.
9294
XmpExistingNamespacePolicy existing_namespace_policy

0 commit comments

Comments
 (0)