Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
mei2score: Nicer selection of following line break/syllables in line
Browse files Browse the repository at this point in the history
  • Loading branch information
th-we committed Jul 9, 2014
1 parent 87d8c68 commit 19b32a9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Resources/public/js/monodi/mei2score.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,11 @@

<!-- If we have a <sb> of a base chant (with capital letter @n) with immediately following base chants,
we combine them on one line, therefore in this case the next line start is not the next <sb> element. -->
<variable name="followingLineStartId" select="generate-id((
following-sibling::mei:sb[not(@source)][1] |
self::*[
$combineWithConsequentBaseChants
]/following-sibling::mei:sb[not(@source)][not(contains($capitalLetters, substring(concat(@n,' '), 1, 1)))][1]
)[last()])"/>
<variable name="syllablesAndEditionSbsInLine" select=".|following-sibling::*[not($followingLineStartId) or following-sibling::*[generate-id()=$followingLineStartId]]"/>
<variable name="followingLineStartId" select="generate-id(
following-sibling::mei:sb[not(@source)][
not($combineWithConsequentBaseChants and contains($capitalLetters, substring(concat(@n,' '), 1, 1)))
][1])"/>
<variable name="syllablesAndEditionSbsInLine" select=".|following-sibling::*[not($followingLineStartId) or following-sibling::mei:sb[generate-id()=$followingLineStartId]]"/>
<variable name="syllablesInLine" select="$syllablesAndEditionSbsInLine/self::mei:syllable"/>
<variable name="lineLabels" select="$syllablesAndEditionSbsInLine/self::mei:sb/@n"/>

Expand Down

0 comments on commit 19b32a9

Please sign in to comment.