Skip to content

api: forces print-object="no" on part-name/part-abbreviation, hiding visible names #227

Description

@webern

Surfaced by the reworked round-trip classifier (PR #225; part of #212).

What

The earlier framing here was backwards. mx does not drop print-object — it
force-writes print-object="no" onto every <part-name> and
<part-abbreviation> on write, silently hiding otherwise-visible part names.

Verified on lysuite/ly01b_Pitches_Intervals.xml:

  • source: <part-name>MusicXML Part</part-name> (visible)
  • mx output: <part-name print-object="no">MusicXML Part</part-name> (hidden)

The 2016 code justified this with the MusicXML 2.0 deprecation note. But that
note deprecates only the name's formatting attributes (font, color, justify,
print-style position) in favor of the *-display elements. print-object is a
separate, non-deprecated attribute that controls visibility; conflating the two
corrupted visible names into hidden ones.

Handling — "two places, one model"

MusicXML can carry a name's formatting in two places: on the deprecated
<part-name> attributes, or in <part-name-display>. mx::api keeps a single
model and follows two rules:

  • print-object is modeled and round-tripped faithfully (tri-state
    unspecified/yes/no); the forced "no" is removed.
  • deprecated formatting is read from wherever it lives and written back only to
    the non-deprecated *-display location; when both are present the *-display
    element wins.

Impact (reorder-free candidate files; 550 total)

  • attr:part-name@print-object: 532 files
  • attr:part-abbreviation@print-object: 10 files

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    aiIssues opened by, or through, a coding agent.area/mx::apiarea/mx::implbugsoftware defect

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions