committed
ZDS 0009: The ODP Reader#
Abstract#
The format record for zenfmt_odp (ai.insan.zenfmt.odp). An OpenDocument presentation projects exactly like PPTX: each draw:page becomes a level-two heading followed by the text of its frames, and speaker notes append as a container classed notes. As with PPTX, the reader says loudly — odp.presentation-projection, a warning on every conversion — that a slide deck loses the most in this projection.
Mapping#
| Source | Tree result | Facets |
|---|---|---|
draw:page | One slide in document order. | The zero-based page index is the surface_index of every layout facet on that slide. |
Frame classed title (presentation:class) | Its first paragraph is the slide’s heading (level 2). Slides without a title frame fall back to the page’s draw:name; empty slides still contribute their heading. | LayoutFacet (surface slide) from the frame’s svg:x/svg:y/svg:width/svg:height, converted exactly to EMU (cm 360000, mm 36000, in 914400, pt 12700, pc 152400, px 9525) and attached to the heading. Frames without geometry attach none; the synthetic fallback heading has no frame and attaches none. |
Other frames’ text:p | Paragraphs, in frame order. | LayoutFacet from the frame’s geometry, attached to the frame’s first emitted block. |
text:span | Character styles resolved through office:automatic-styles and styles.xml with style:parent-style-name chains (16 hops), exactly the ODT rules: bold weight → strong, italic → emphasis, and the rest of the canonical nesting order. | none. |
text:a | link with the xlink:href target. | none. |
text:list | list; ordered when the list style’s first level is text:list-level-style-number, as in ODT. | LayoutFacet from the enclosing frame, when the list is the frame’s first block. |
table:table inside a frame | A table, streamed as in the ODT reader. Every row lands in table_body — presentations have no header semantics — unless the deck declares table:table-header-rows, which maps to table_head. table:covered-table-cell folds into its originating cell and table:number-columns-spanned carries as the cell’s column span. | LayoutFacet from the enclosing frame, when the table is the frame’s first block. |
presentation:notes | A container with class notes appended after the slide’s frames. | none. |
office:annotation | Dropped with odp.annotations-dropped. | none. |
Deliberate omissions#
| What | Why |
|---|---|
| Positioning, sizes, z-order, rotation | A linear document has no spatial layout; this is the projection the warning names. |
| Animations, transitions, timings | Behavior, not content. |
| Images, charts, media, non-text shapes | Dropped; the projection warning covers them. Carrying images is future work shared with the PPTX reader. |
| Master pages and layout inheritance | Slide masters carry design, not content; placeholder text is never document text. |
Presenter console settings, presentation:settings | Tooling state. |
Round-trip expectations#
None: ODP is read-only and no preservation namespace is written. The projection is deliberately lossy and the loss is announced on every conversion; a Markdown-to-slides authoring path is a different feature with its own record.
Security#
The shared zenfmt_ooxml archive limits and the DTD-free XML parser apply unchanged. The frame machine is the same bounded, non-recursive design as the ODT reader: a 256-frame stack and skipElement for subtrees the mapping drops.
References#
- ZDS 0002, Reading the Office Formats.
- ZDS 0006, The ODT Reader (style resolution shared with this reader).
- ZDS 0007, The PPTX Reader (the projection conventions).
- OASIS OpenDocument v1.3 Part 3,
draw:*andpresentation:*.