-
Notifications
You must be signed in to change notification settings - Fork 186
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
Replace xlink:href by href? #1158
Comments
There is no plan to move to SVG2 in the near future. What is SVG.js? |
As far as I remember the |
I see. This page was warning that some browser won't support it anymore in some future point. |
Since you use it server-side the best for now is simply to pipe the output through a simple XSLT that changes the attribute to I think it will be a long way until most browsers will support SVG 2.0, and until them it will be wiser to stick with the current version. |
As you can see here, |
Yes, that's what I am going to do. Thanks for the information :) |
No need for replacement yet. The latest W3C Candidate Recommendation says:
If we simply double the information we should achieve a higher compatibility. |
…and we would increase filesizes considerably. I'm frequently running into issues with that, so I'm not in favor. Could that be an option in Verovio? |
Just tested it. It increases file sizes by about 2% to 3%. |
@kepper Tried to update Beethovens Werkstatt? |
No time to look back at old versions – neither of Verovio nor our own tools. Right now I face files with 750+ measures / 8 staves, and huge amounts of additional (analytical) markup. This mostly affects RAM, but the plain XML easily exceeds 10MB. But that's a different story, and I'm not complaining. I just don't think that duplicating information is particularly clever… |
After some extensive testing it seems that some browsers, in some cases, will not display SVG if the `href` attribute is prefixed with `xlink`, a change that was introduced with SVG 2.0. This is not yet a recognized specification, but the changes in browsers are being enacted nevertheless. On the other hand, some strict SVG 1.1 clients will not render the SVG correctly if it *doesn't* include the `xlink:` prefix. In my testing this included Inkscape. Given that the most likely target for Verovio output is browsers, but still wishing to retain backwards compatibility, this PR changes the default behaviour from producing `xlink:href` to simply `href`. Clients that need the full attribute name can set `--svg-include-xlink` which will insert the xlink prefix on the href attributes. References previous discussions on this topic: #1158, #332
The SVG that verovio generates seems to make frequent use
xlink:href
attributes in<use>
elements.xlink:href
is deprecated in SVG2 and I just ran into a strange bug where SVG.js failed to calculate bounding boxes because of that. Could it be replaced by justhref
?The text was updated successfully, but these errors were encountered: