Skip to content

Commit

Permalink
Bug/432 go to measure… function returns wrong measure (#457)
Browse files Browse the repository at this point in the history
## Description, Context and related Issue
<!--- Please describe your changes. Why is this change required? What
problem does it solve? -->
This PR is a quick fix for the issue 432. Change the code [on line
number
](e6c2430#diff-11ca3497e203008800617bf27e9109f5234eca41d0e5a7452e35a91e94fc494fR27)
to
e6c2430#diff-11ca3497e203008800617bf27e9109f5234eca41d0e5a7452e35a91e94fc494fR27
will look for the first <measure> element within a specified movement
($movementId) where either: the @Label attribute equals $measureIdName,
or, the @n attribute equals $measureIdName other than relaying only on
@n.
<!--- This project only accepts pull requests related to open issues.
Please link to the issue here: -->
Refs #
#432 

## How Has This Been Tested?
Tasted on weber klarinettenquintett.
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you
ran. -->

## Types of changes
<!--- What types of changes does your code introduce? Please delete
options that are not relevant. -->
- [X ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [X ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation Update

## Checklist
<!--- Go over all the following points, and delete options that are not
relevant. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ X] I have performed a self-review of my code
- [ X] I have read the
[CONTRIBUTING](https://github.com/Edirom/Edirom-Online/blob/develop/CONTRIBUTING.md)
document.
- [ ] I have added tests to cover my changes.
- [ X] All new and existing tests passed.
  • Loading branch information
hizclick authored Oct 31, 2024
2 parents 5e8d3b8 + 1df3d00 commit 29dbe65
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions add/data/xql/getMeasurePage.xql
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ declare function local:findMeasure($mei, $movementId, $measureIdName) as element
if ($m) then
($m)
else
(($mei/id($movementId)//mei:measure[@n eq $measureIdName])[1])
};

(($mei/id($movementId)//mei:measure[@label eq $measureIdName], $mei/id($movementId)//mei:measure[@n eq $measureIdName])[1])
}
declare function local:getMeasure($mei, $measure, $movementId) as map(*) {
let $measureId := $measure/string(@xml:id)
let $zoneId := substring-after($measure/string(@facs), '#')
Expand Down

0 comments on commit 29dbe65

Please sign in to comment.