Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
rettinghaus committed Dec 20, 2023
1 parent 44d64f9 commit ce15c32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/structure/xml-ids.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ parent: "General structure"

## XML IDs

Exporting from MEI from MuseScore generates MEI IDs (i.e., `@xml:id`s). These are used for internal referencing (e.g., the `@startid` on a `dynam` referencing the `chord` it is attached to), but they can also be used for referencing MEI elements externally.
Exporting to MEI from MuseScore generates MEI IDs (i.e., `@xml:id`s). These are used for internal referencing (e.g., the `@startid` on a `dynam` referencing the `chord` it is attached to), but they can also be used for referencing MEI elements externally.

The MEI IDs are randomly generated. This means that exporting a file twice will have different MEI IDs. However, it is possible to seed the random generator with a value to be given in a `xml:id` property in the MuseScore metatag properties. When exporting to MEI, the value in the metatag is set as the `@xml:id` of the root `mei` element. It is preserved at import too, meaning the the `mei@xml:id` is set as `xml:id` metatag property in the imported MuseScore file.

Some elements that do not have a corresponding MuseScore object have no `@xml:id`. These are:

* `accid`
* `beam`
* `gracegrp`
Expand All @@ -26,4 +27,4 @@ When no `mei@xml:id` is given in the imported data, IDs in MEI data imported int

Modifying the data (e.g., changing the pitch of a note) will not modify the ID for the note. If some of the data is copied (e.g., the content of a measure), the copied data will be attribute new random IDs at export.

If a `mei@xml:id` is given in the imported data, the value will be used to seed the random generator and IDs will be regenerated. Having modified the data (e.g., changed the pitch of a note) will not impact the MEI IDs, which will remain the same. However, if some elements are inserted or deleted, that will modify the IDs in the resulting MEI file.
If a `mei@xml:id` is given in the imported data, the value will be used to seed the random generator and IDs will be regenerated. Having modified the data (e.g., changed the pitch of a note) will not impact the MEI IDs, which will remain the same. However, if some elements are inserted or deleted, that will modify the IDs in the resulting MEI file.

0 comments on commit ce15c32

Please sign in to comment.