![]() |
The id/nam issue
Sigil (or Tidy) will change <a href="#note01" id="to_note01"> to <a href="#note01" id="to_note01" name="to_note01">. However, when parsing such a file in Validator (http://threepress.org/document/epub-validate/), you get the message:
ERROR: attribute "name" not allowed at this point. The developers of Tidy are aware of this bug (see issue 226), but I wonder what we can do in the mean time. I can delete all the wrong attributes in a few minutes using wildcards, but when I save the file and open it again, all the wrong name-attributes are there again. Does anyone have a good trick? Or do you just leave the name attributes? |
Quote:
I'll fix it myself when I find the time. Probably for 0.2.1. Until then, don't worry about it. AFAIK "name" is merely deprecated in XHTML, not disallowed. Baaah, I checked the wrong version of the XHTML spec. In 1.1, it is officially removed for "a" elements, not just deprecated. Still, don't worry about it. No renderer is ever going to flake out on that. But like I said, I'll fix it when I find the time. |
The name attribute for <a>-elements is forbidden in XHTML 1.1 if doctype "strict" is used. When using XHTML 1.0 (all doctypes) or 1.1 with another doctype than "strict" (eg. "transitional") then it's just deprecated. Anyway, the OPS-2.0 spec relies on XHTML 1.1 and if doctype "strict" is used then the name attribute is disallowed.
|
I've just run into this issue as well. I'd like not to worry about it, but my distributor (one of the largest ones in the US) will not allow us to upload files with the name attribute present. So if it's possible to make it a slightly higher priority fix, that would be great. Until it is, I won't be able to use Sigil (or at least will have eventually to open my file in another editor before uploading and make the fixes manually). Thanks!
|
Quote:
I planned to take a look at it for 0.2.1, but if it's impacting you this much (i.e., not able to work), I'll try to take a look at it for beta2 of 0.2.0 (beta1 will be out in a few days). |
I felt bad about you not being able to work until this issue was fixed so I took a look at it now. It turned out to be remarkably simple to fix: Tidy (wrongly) specifies that the "name" attribute is present in the XHTML 1.1. spec, and has a special function for "fixing" (actually breaking) anchors.
So while I was analyzing this function for a not-too-intrusive way to turn it off, I noticed Tidy has an option for turning on/off this "name fixing" behavior. The option is switched on by default, but Tidy usually changes options according to the required doctype. So this should have been turned off internally, but it wasn't. Either way, I now explicitly turned it off and it all works. No more name attribute. You can build Sigil from source and get the fix right now if you need it ASAP, or you can wait for the first beta of 0.2.0. |
You're really the best. And I know that you have tons and tons of issues to fix. I just thought I'd put another vote in for this one—and also that it's an issue that effects not just me, but it seems to be the way things are going. I really really appreciate it and all of your hard work—especially in the face of whiners like me!
|
| All times are GMT -4. The time now is 06:37 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.