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

オープン 初心者向け
#646 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
testing

調査の方向性

sdpm/sdpm/engine/timing/writer.py と tests/test_animation_writer.py から始め、p:animScale と p:animClr で出力される値の子要素の順序を、issue に記載された ECMA-376 の順序と比較します。生成されたタイミング XML がそれらの順序に従っていることを検証するテストを追加し、reader は引き続きどちらの順序も許容するようにします。writer がスキーマの順序で出力し、テストでそれを検証できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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: https://github.com/aws-samples/sample-spec-driven-presentation-maker/pull/595

主要言語
Python
スター
136
フォーク
13
平均マージ
7時間 43分
マージ済み PR(30日)
180

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws-samples/sample-spec-driven-presentation-maker のほかの issue

aws-samples/sample-spec-driven-presentation-maker の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。