Every Dublin Core and dcterms field exposed by docProps/core.xml, one field isolated per expanded case. Each case round-trips through python-pptx's Presentation.core_properties API.
Library verdicts: python-pptx: — pptxjs: —
| Feature id | pptx/core-properties-full--last-modified-by |
|---|---|
| Format | pptx |
| Category | metadata |
| Family | pptx/core-properties-full |
| Axis values | field=last-modified-by |
| Spec | ecma-376-5-part-2 § 11.1 |
| ID / part | Predicate | XPath | python-pptx | pptxjs |
|---|---|---|---|---|
core-last-modified-by-presentdocProps/core.xml | existThe last-modified-by element must be present in docProps/core.xml. | //cp:lastModifiedBy | — | — |
core-last-modified-by-valuedocProps/core.xml | equal = Bob ReviewerThe last-modified-by element's text must equal the supplied value. | //cp:lastModifiedBy | — | — |
No render assertions declared.
scripts/gen_core_properties_full_pptx.py
#!/usr/bin/env python3
"""Generate ``fixtures/pptx/core-properties-full--<field>.pptx`` fixtures.
Parameterised generator: one call per field under test. Mirrors the docx and
xlsx counterparts and satisfies ``features/pptx/core-properties-full.json``.
Fixtures are byte-reproducible: ``zip_date_time`` pins the zip-member clock to
2000-01-01, and ``dcterms:created`` / ``dcterms:modified`` are always pinned
to fixed ISO-8601 values so the embedded metadata doesn't drift.
"""
from __future__ import annotations
import argparse
import datetime as _dt
from pathlib import Path
from pptx import Presentation
_REPO_ROOT = Path(__file__).resolve().parent.parent
_REPRODUCIBLE_DT = _dt.datetime(2000, 1, 1, 0, 0, 0)
_PINNED_CREATED = _dt.datetime(2026, 1, 1, 0, 0, 0, tzinfo=_dt.timezone.utc)
_PINNED_MODIFIED = _dt.datetime(2026, 1, 2, 0, 0, 0, tzinfo=_dt.timezone.utc)
def _apply(prs, field: str, value: str) -> None:
cp = prs.core_properties
cp.created = _PINNED_CREATED
cp.modified = _PINNED_MODIFIED
if field == "title":
cp.title = value
elif field == "subject":
cp.subject = value
elif field == "creator":
cp.author = value
elif field == "description":
cp.comments = value
elif field == "language":
cp.language = value
elif field == "keywords":
cp.keywords = value
elif field == "last-modified-by":
cp.last_modified_by = value
elif field == "revision":
cp.revision = int(value)
elif field == "category":
cp.category = value
elif field == "content-status":
cp.content_status = value
elif field == "created":
cp.created = _dt.datetime.strptime(value, "%Y-%m-%dT%H:%M:%SZ").replace(
tzinfo=_dt.timezone.utc
)
elif field == "modified":
cp.modified = _dt.datetime.strptime(value, "%Y-%m-%dT%H:%M:%SZ").replace(
tzinfo=_dt.timezone.utc
)
else:
raise SystemExit(f"Unknown field id: {field!r}")
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--field", required=True)
parser.add_argument("--value", required=True)
parser.add_argument(
"--out",
default=str(_REPO_ROOT / "fixtures" / "pptx" / "core-properties-full.pptx"),
)
args = parser.parse_args()
out_path = Path(args.out)
if not out_path.is_absolute():
out_path = _REPO_ROOT / out_path
prs = Presentation()
# A single blank slide keeps the package minimal but valid.
prs.slides.add_slide(prs.slide_layouts[6])
_apply(prs, args.field, args.value)
out_path.parent.mkdir(parents=True, exist_ok=True)
prs.save(out_path, zip_date_time=_REPRODUCIBLE_DT)
print(out_path)
return 0
if __name__ == "__main__":
raise SystemExit(main())
{
"$schema": "../manifest.schema.json",
"id": "pptx/core-properties-full--last-modified-by",
"kind": "literal",
"title": "Core properties (full DC + dcterms field set)",
"format": "pptx",
"category": "metadata",
"summary": "Every Dublin Core and dcterms field exposed by docProps/core.xml, one field isolated per expanded case. Each case round-trips through python-pptx's Presentation.core_properties API.",
"spec": {
"source": "ecma-376-5-part-2",
"clause": "11.1",
"notes": "ECMA-376 Part 2 / ISO 29500-2 section 11 defines the OPC 'core-properties' part. It carries a mix of Dublin Core, dcterms, and MS-OPC-core elements. This manifest isolates each one in turn so each XPath assertion proves that particular field round-trips. dcterms:created / dcterms:modified are set to a fixed ISO-8601 UTC timestamp in the generator so the fixtures are byte-reproducible."
},
"fixtures": {
"machine": "pptx/core-properties-full--last-modified-by"
},
"generator": {
"python": "scripts/gen_core_properties_full_pptx.py",
"arg_template": "--field {field.id} --value \"{field.value}\" --out fixtures/pptx/core-properties-full--{field.id}.pptx"
},
"_expansion": {
"parent_id": "pptx/core-properties-full",
"bindings": {
"field": "last-modified-by"
}
},
"assertions": [
{
"id": "core-last-modified-by-present",
"part": "docProps/core.xml",
"namespaces": {
"cp": "http://schemas.openxmlformats.org/package/2006/metadata/core-properties",
"dc": "http://purl.org/dc/elements/1.1/",
"dcterms": "http://purl.org/dc/terms/"
},
"xpath": "//cp:lastModifiedBy",
"must": "exist",
"description": "The last-modified-by element must be present in docProps/core.xml."
},
{
"id": "core-last-modified-by-value",
"part": "docProps/core.xml",
"namespaces": {
"cp": "http://schemas.openxmlformats.org/package/2006/metadata/core-properties",
"dc": "http://purl.org/dc/elements/1.1/",
"dcterms": "http://purl.org/dc/terms/"
},
"xpath": "//cp:lastModifiedBy",
"must": "equal",
"value": "Bob Reviewer",
"description": "The last-modified-by element's text must equal the supplied value."
}
]
}
No rendered reference is available for this case.