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

Đang mở Phù hợp với người mới
#646 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
testing

Hướng nghiên cứu

Bắt đầu với sdpm/sdpm/engine/timing/writer.py và tests/test_animation_writer.py; so sánh thứ tự các phần tử con chứa giá trị được phát ra cho p:animScale và p:animClr với các chuỗi ECMA-376 được nêu trong issue. Bổ sung kiểm thử để xác thực XML timing được tạo ra theo các chuỗi đó, đồng thời giữ cho reader chấp nhận cả hai thứ tự. Hoàn tất khi writer phát ra theo thứ tự schema và các kiểm thử xác minh điều đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
136
Fork
13
Merge trung bình
7 giờ 43 phút
Pull request đã merge (30 ngày)
180

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws-samples/sample-spec-driven-presentation-maker

Tất cả issue của aws-samples/sample-spec-driven-presentation-maker

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.