Edit and diagnose source
Locate a source field, preserve neighboring markup, and distinguish invalid input from a renderer limit.
Start with the file and the element that owns the edit. A key’s value belongs to that key, even if the same number appears in the base attribute or another track. A sequence’s cut belongs to the file declaring the placement. The artwork in a referenced scene belongs to that scene’s file, and editing it can change every placement that uses the reference. Source-preserving editing
Verify the smallest edit
Open the rectangle fixture and select the rectangle’s single-quoted width value. Save once without making a change and compare the file bytes. Then change only the selected value from 40 to 44 and compare again. The diff should contain one changed value. At (50, 20) the sample changes from transparent to terracotta. The height and position stay fixed. The rectangle exchange case records the full input and expected edit behavior.
Preserve unrelated comments, quote choice, line endings, sibling order, and attributes that a host uses for metadata. In the host labels example, those extra attributes stay in the source and have no effect on the sample. Adding a new attribute or child changes the document structure at its owner. When editing copy, preserve unrelated text ranges and entity spellings. Source names and extension attributes
Follow a diagnostic to its owner
| Example change | Where to look |
|---|---|
Delete the opening scene’s height while leaving width. | The scene owns the canvas pair. Either supply both dimensions or omit both and provide a viewport at render time. |
Give one shape both a rect and an ellipse. | The second child exceeds the shape’s geometry slot. Give each geometry its own shape. |
| Change the rate so two keys resolve to the same instant. | The track requires strictly increasing resolved addresses. Check the frame numbers against exact-time keys at the new rate. |
Misspell the local file in a sequence’s href. | Check the placement and resolve its path from the file that declares it. |
| Render valid footage with the SVG preview. | This preview’s renderer reports unsupported media. Use the host’s coverage and the requested operation to distinguish a renderer limitation from a syntax error. |
The strict preview reports a source location for invalid attachments and refuses that sample. For example, along on a child of a compound path requires a diagnostic because the host lacks a single contour. To see the host’s specified fallback while retaining the warning, use the preview’s --best-effort mode. Attachment diagnostics · Preview behavior