MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   ePub (https://www.mobileread.com/forums/forumdisplay.php?f=179)
-   -   SVG images trigger data-name error (https://www.mobileread.com/forums/showthread.php?t=337934)

SigilBear 03-10-2021 08:00 PM

SVG images trigger data-name error
 
I just recently learned how to make SVG images. They were working great in my pub until I discovered they're registering errors in Pagina: Attribute data-name not allowed here

I'll probably have to pursue this on a SVG forum, but I wanted to first find out if SVG images should be used in epubs to begin with. Alternatively, is this an error message I can simply ignore?

Thanks.

Turtle91 03-11-2021 01:09 PM

Yes, SVG images can be used - I use them all the time. Having said that, some older devices may not play nicely with them, so check your target device for compatibility.

As for the errors, some software might be adding metadata attributes that are not in the "standard" or that the checker software doesn't recognize. Either update your checking sofware, or just remove the metadata attribute manually. One way you can do that is by clicking on the svg file within Sigil, then finding/deleting the offensive info.

edit:
I also make sure I remove any extra metadata when I save an SVG using inkscape...just select/deselect the appropriate boxes in the save dialog. ( I use Optimized SVG) I'm sure there are equivalent options in other software.

JSWolf 03-11-2021 01:31 PM

Of course, it could be a problem with Pagina. What are they using as a checker?

SigilBear 03-11-2021 06:37 PM

Quote:

Originally Posted by JSWolf (Post 4101488)
Of course, it could be a problem with Pagina. What are they using as a checker?

Pagina E-pub Checker. Is there are better epub checker I should be using?

SigilBear 03-11-2021 06:42 PM

Wow, good tip about clicking on the SVG file in Sigil. I didn't realize you could view the source code like that.

I just recently learned how to work with SVG using Illustrator. I just save them with the default settings:

Styling: Internal CSS
Images: Preserve
Object IDs: Layer Names
Decimal: 2 (I sometimes have to change it to 3 in order to make text display correctly.)

Minify and Responsive are checked by default, also.

As for target devices, I've only viewed my epub with Apple Books so far, and they look fine. That's why I wondered if the error might be some kind of bug I can just ignore.

Thanks for the tips.

Doitsu 03-12-2021 01:38 AM

Quote:

Originally Posted by SigilBear (Post 4101267)
I just recently learned how to make SVG images. They were working great in my pub until I discovered they're registering errors in Pagina: Attribute data-name not allowed here

Attributes that start with data- are custom attributes. Since they're usually app-specific, you can simply delete them. I.e., search for data-name=".*?" and delete the attribute.

Quote:

Originally Posted by SigilBear (Post 4101559)
Pagina E-pub Checker. Is there are better epub checker I should be using?

pagina EPUB-Checker is a GUI for EPUBCheck. There is no better checker.

SigilBear 03-14-2021 07:10 AM

Quote:

Originally Posted by Doitsu (Post 4101617)
Attributes that start with data- are custom attributes. Since they're usually app-specific, you can simply delete them. I.e., search for data-name=".*?" and delete the attribute.



pagina EPUB-Checker is a GUI for EPUBCheck. There is no better checker.

Wow, I wasn't even aware you could do wild card searches in Sigil. That'll save me a lot of time. Thanks.

JSWolf 03-16-2021 07:48 PM

I've found that the combination of the Calibre ePub checker and epubcheck is a good combination. Calibre's ePub checkers handles checks the CSS better then epubcheck.


All times are GMT -4. The time now is 05:58 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.