Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fix files so that they are validated by the schema #15
base: main
Are you sure you want to change the base?
Fix files so that they are validated by the schema #15
Changes from 1 commit
1e9318e
5348936
e0f127c
b4e87ff
092408c
cebfc86
826326b
9c1e22f
98036ed
f18e7f6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems counterintuitive to me to iterate through the
child
attributes to get a single attribute?Why not
child.get("href")
(maybe you have to namespace it)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iteration is used to avoid problems with namespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the namespaces of the liber MEI 3 files inconsistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes the namespace shows up, sometimes it doesn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like, different mei3 files will have different namespaces?
Do you have an example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just ran a script to print out every unique attribute of the files. One attribute has {http://www.w3.org/1999/xlink} as a namespace, one has {http://www.w3.org/XML/1998/namespace}, the remaining have no namespace. I can look into removing the iteration for attributes with no namespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So on
zone
elements, you are setting thelabel
attribute to "ulx = some_number " ? Thelabel
attribute looks like is designed for a tooltip or some such?Why not use the
Element.set
method here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code rewritten to use
child.set
The
label
attribute here is used whenulx
orlrx
is negative to save their original valuesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that necessary? We are saving the original files if we ever need those values and it seems to me we should be trying to have the MEI v5 files created be "up to code".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label attribute removed