Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetElementAttr() does not consider all elements in input MEI file #3710

Closed
GustavTaxen opened this issue Jun 20, 2024 · 0 comments
Closed

GetElementAttr() does not consider all elements in input MEI file #3710

GustavTaxen opened this issue Jun 20, 2024 · 0 comments

Comments

@GustavTaxen
Copy link

It looks like vrv::Toolkit::GetElementAttr() only returns certain types of element. For example, <staffDef> elements cannot be queried, which makes it impossible to use the Toolkit to find the meter count and unit for a staff.

To reproduce, load a MEI file with an identified <staffDef> element, e.g.,

...
<scoreDef>
  <staffGrp>
    <staffDef xml:id="mystaff" n="1" lines="5" clef.shape="F" clef.line="4" meter.count="4" meter.unit="4" />
  </staffGrp>
</scoreDef>
...

Expected behaviour
The function searches all elements for the specified xml:id tag. In this case, it should return an object that contains

{
	"n": "1",
	"lines": "5",
	"clef.shape": "F",
	"clef.line": "4",
	"meter.count": "4",
	"meter.unit": "4"
}

Actual behaviour
The function returns {}, an empty object.

Verovio information

  • Version of Verovio: 4.2.0
  • Binding: JavaScript

Environment information (as appropriate)

  • OS: MacOS
  • Browser: Chrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants