Skip to content

Commit

Permalink
Merge branch 'ism-dme-develop' into develop
Browse files Browse the repository at this point in the history
dropped conflicting rng file
  • Loading branch information
kepper committed Oct 29, 2020
2 parents cf57ff5 + 07ffeb5 commit 8ed9271
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Do **not** simply reference another issue or pull request by number in the summa

The details of the commit go in the body. Specifically, the body should include the motivation for the change. For commits that fix bugs you should contrast behavior before the commit with behavior after the commit.

### Message Summary
### Message Footer

If the commit closes an issue by fixing the bug, implementing a feature, or rendering it obsolete, or if it references an issue without closing it, that should be indicated in the message footer.

Expand Down
26 changes: 26 additions & 0 deletions source/modules/MEI.shared.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3115,6 +3115,32 @@
<rng:ref name="data.STEMPOSITION"/>
</datatype>
</attDef>
<attDef ident="stem.sameas" usage="opt">
<desc>Points to a note element in a different layer whose stem is shared.
The linked notes should be rendered like a chord though they are part of different layers.
</desc>
<datatype maxOccurs="1">
<rng:ref name="data.URI"/>
</datatype>
<constraintSpec ident="check_stem.sameasTarget" scheme="isoschematron">
<constraint>
<sch:rule context="@stem.sameas">
<sch:let name="layer.n" value="self::node()/ancestor::mei:layer/@n"/>
<sch:let name="ref.id" value="substring(.,2)"/>
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@stem.sameas attribute
should have content.</sch:assert>
<sch:assert role="warning"
test="substring(.,2)=//mei:note[not(ancestor::mei:layer/@n=$layer.n)]/@xml:id">
The value in @stem.sameas should correspond to the @xml:id attribute of the linked note
element of a different layer.</sch:assert>
<sch:assert role="warning"
test="../@dur=//mei:note[@xml:id=$ref.id]/@dur">
The linked notes by @stem.sameas should have the same @dur values.
</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</attDef>
<attDef ident="stem.visible" usage="opt">
<desc>Determines whether a stem should be displayed.</desc>
<datatype>
Expand Down
44 changes: 44 additions & 0 deletions tests/mei-CMN/stem-sameas-testing.mei
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="../../schemata/mei-CMN.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="../../schemata/mei-CMN.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei meiversion="4.0.0" xmlns="http://www.music-encoding.org/ns/mei">
<meiHead>
<fileDesc>
<titleStmt>
<title>stem.sameas example</title>
</titleStmt>
<pubStmt/>
</fileDesc>
</meiHead>
<music>
<body>
<mdiv>
<score>
<scoreDef meter.count="4" meter.sym="common" meter.unit="4">
<staffGrp>
<staffDef clef.line="2" clef.shape="G" lines="5" n="1"/>
</staffGrp>
</scoreDef>
<section>
<measure>
<staff n="1">
<layer n="1">
<note dur="4" oct="5" pname="c" xml:id="l1n1"/>
<note dur="4" oct="5" pname="c" xml:id="l1n2"/>
<note dur="4" oct="5" pname="c" xml:id="l1n3"/>
<note dur="4" oct="5" pname="c" xml:id="l1n4"/>
</layer>
<layer n="2">
<note dur="4" oct="4" pname="c" stem.sameas="#l1n1" xml:id="l2n1"/>
<note dur="4" oct="4" pname="c" stem.sameas="#l1n2" xml:id="l2n2"/>
<note dur="4" oct="4" pname="c" stem.sameas="#l1n3" xml:id="l2n3"/>
<note dur="4" oct="4" pname="c" stem.sameas="#l1n4" xml:id="l2n4"/>
</layer>
</staff>
</measure>
</section>
</score>
</mdiv>
</body>
</music>
</mei>

0 comments on commit 8ed9271

Please sign in to comment.