From 2ef424e77428da533a0d8386871ff6d1066681f0 Mon Sep 17 00:00:00 2001 From: Mohd Alnatsheh Date: Fri, 18 Sep 2026 11:20:00 -0700 Subject: [PATCH 1/3] Return a Document from serializeToJATS; use for bibliography ref parsing serializeToJATS() now returns the built Document instead of an already-serialized string, letting each consumer choose its own serialization strategy. Callers under Node (real DOM) can use the real w3c-xmlserializer; manuscripts-cf-worker's linkedom-based DOM can just call Document#toString(). This removes the need for cf-worker's patched w3c-xmlserializer, whose spec-correct namespace resolution never worked against linkedom's DOM model. w3c-xmlserializer moves from a runtime dependency to a devDependency, used only by this package's own test suite (which runs under jsdom) to stringify the returned Document for snapshot/content assertions. Also replaces the