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

SVG ids are not valid #323

Open
wbrisett opened this issue Apr 26, 2021 · 3 comments
Open

SVG ids are not valid #323

wbrisett opened this issue Apr 26, 2021 · 3 comments
Labels
Milestone

Comments

@wbrisett
Copy link

When exporting SVG images from Wavedrom, I discovered not all IDs are valid. According to the XML spec, IDs cannot begin with a numeric value, they must start with an alpha character. However, Wavedrom is using a combination of them.

<defs> <g id="socket"> <rect y="15" x="6" height="20" width="20"/> </g> <g id="pclk"> <path d="M0,20 0,0 20,0" class="s1"/> </g> <g id="nclk"> <path d="m0,0 0,20 20,0" class="s1"/> </g> <g id="000"> <path d="m0,20 20,0" class="s1"/> </g> <g id="0m0"> <path d="m0,20 3,0 3,-10 3,10 11,0" class="s1"/> </g> <g id="0m1"> <path d="M0,20 3,20 9,0 20,0" class="s1"/> </g>

   Here socket, pclk, and nclk are all valid, but all remaining values are not. Most tools seem to be allowing these, however, we have to validate all our content and images created with wavedrom are all failing due to this problem. 
@drom drom added the bug 🪲 label May 6, 2021
@drom
Copy link
Member

drom commented May 6, 2021

does it cause XML validation issues somewhere?

@wbrisett
Copy link
Author

wbrisett commented May 6, 2021

It does we use epubcheck and when we have documents that contain wavedrom derived SVGs it will not pass those documents and thus we can't publish them. Looking at the raw SVG it really is a simple matter of following the standard XML ID rules and not using a numeric character as the very first character (anywhere else is fine).

@drom drom added this to the v3 milestone May 16, 2021
@wbrisett
Copy link
Author

wbrisett commented Mar 1, 2023

Has there been any progress on this bug yet. It's been two years and WaveDrom still violates the XML standard, which is causing issues since our validation tools reject these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants