From 9e0d8b8d127d31f7e38475f9c6edea75e5af3800 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 13 Nov 2026 06:47:09 -0500 Subject: [PATCH] Add shared IDML XMP metadata writer --- crates/idml/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/idml/src/lib.rs b/crates/idml/src/lib.rs index f7a698c34..3b2cf45f7 100644 --- a/crates/idml/src/lib.rs +++ b/crates/idml/src/lib.rs @@ -51,6 +51,14 @@ pub const DOM_VERSION: &str = "16.0"; /// The namespace of the `idPkg` prefix. pub const PACKAGING_NS: &str = "http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging"; +/// Writes the bounded XMP metadata packet used by an IDML package. Dates are already normalized +/// ISO-8601 values supplied by the caller; this function owns the XML vocabulary and envelope. +pub fn xmp_metadata(create_date: &str, modify_date: &str) -> String { + format!( + "\n\n \n \n {create_date}\n {modify_date}\n \n \n\n" + ) +} + /// Why a package was not read or not written. #[derive(Clone, Debug, PartialEq, Eq, thiserror::Error)] pub enum Error {