Skip to content

Timing writer emits p:animScale / p:animClr value children out of ECMA-376 sequence #646

Open

Description

@ShotaroKataoka

The timing writer appends the value children of p:animScale (and p:animClr) as to, from, by, tavLst (sdpm/sdpm/engine/timing/writer.py, introduced in #595). ECMA-376 declares them as an xsd:sequence: CT_TLAnimateScaleBehavior is cBhvr, by?, from?, to?, and p:animClr has the same order. A generated entrance.curveUp therefore carries cBhvr, to, from, which a strict validator rejects.

PowerPoint's parser accepts the out-of-sequence order, so nothing fails today. Since #595 makes the reader compare those children by element name, a PowerPoint file written in sequence order now imports as semantic JSON and is regenerated out of sequence.

The suite has no schema validation of generated timing XML. tests/test_animation_writer.py states that the writer never emits a schema-invalid node, but it checks element order only at the p:timing insertion point.

Proposed scope:

  • Emit the value children in schema order.
  • Add a test that validates generated timing XML against the ECMA-376 sequence for the behaviour elements the writer emits.

This changes generated bytes, so the reader should keep accepting both orders.

Raised in the #595 review: #595

Activity

  1. naohito2000 commented on Dec 3, 2026

    @naohito2000
    Contributor

    Parked together with #595, which is now a draft.

    The file this is about, sdpm/sdpm/engine/timing/writer.py, does not exist on main — the whole sdpm/sdpm/engine/timing/ directory is only on feat/pptx-animations-transitions. So nothing on main, in a release tag, or in a fresh clone writes animation timing at all, and this cannot affect anyone until #595 lands. It will be fixed before that happens, not after.

    No action needed here for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions