From the course: Editing Ebooks

Using validation tools - InDesign Tutorial

From the course: Editing Ebooks

Start my 1-month free trial

Using validation tools

- [Instructor] oXygen has some built-in validation tools, and most text editors have some sort of built-in checks checking the validity of the HTML, or the CSS, or similar. But even if you are using oXygen, you will want to use an EPUB-specific validator that is up to date with the ever changing EPUB spec. EPUB-Checker is a freeware tool developed and maintained by the Publishing@WC3 group. It is updated as the spec progresses, which means that it is always under development, keeping the tool up to date with those changes. In addition, this open source tool is built-in to a lot of ebook distributor's systems. For example, it's built right into Ingram's CoreSource. My own workflow is to edit EPUBs while running through EPUB-Checker at every iteration, and I certainly use EPUB-Check to check my EPUB before I upload it to any retailer. The tool is available in 12 languages. The download is here. The website at first glance looks like it's in German, but don't be afraid, wade through to find the Download button. It is fairly uncomplicated to use, a drag and drop script. Let's have a look at what it looks like in action. I have the app sitting here on my desktop, and I have the ebook that I want to check here. I'm opening the app by double-clicking it, and then just drag the EPUB over, and it will run it through this validation check. I planted some validation errors into this EPUB, so let's see this excellent app in action. Each error, and there's 16 of them here, each error leaves some clues to what is off in the ebook, but it does sometimes take some detective work to figure out what is causing the EPUB-Checker to squawk, so let's have a look through. This first error, it's an error, this is the code, I don't know what that code means, you can ignore this column. This is the clue to what's going on. It's in BreakingTheOcean_epub-11.xhtml, and it's on line 41. It says there's an error parsing the element div, so, this error message is not necessarily useful or helpful, but we can figure out what it is from the line item there. I'm going to navigate to that ebook with the validation errors planted, and I'm going to go down to 11.html. So here's what's happening. The squawk starts on line 41, just like it said, and I think, if I scroll over, what's happening is that it's missing a p tag, and there, the validation error went away in oXygen, so let's go back and try that again. Now, I have one warning and two errors. So that's nice, that cleared up a whole bunch of things, but there's still some other things happening here, so let's parse through this next one. The next error is in the toc.xhtml and it's on line 246. So we'll navigate back to oXygen, close that HTML file and go down to the toc.xhtml, scrolling down to line 246. So the error here is the hyperlink is to a destination that's not defined. I think if I delete that B there, it should clear it up. So I now have one error. We're getting there. There's an error in the CSS on line 23, so I navigate back into the EPUB, and go up to the CSS, and down to line 23. This is going to take some detective work, because it doesn't look like there's anything off here. The architecture of that line is fine, there's an opening bracket, a closing bracket, a semicolon, quote marks, source, and a colon. So there's a problem with Minion Pro Bold, so let's go to the font. So there's the problem. The problem is that in the font folder, there is no Minion Pro Bold. So if I delete this, sometimes instead of deleting, you'll want to just comment it out, so that you can come back and uncomment it when you need to. So I've commented it out, I've made it into something that it will get ignored, but it's still there just in case I need to reinstate it, so let's save that, hide it, and run this through EPUB-Checker again. There, no errors and warnings are detected, the EPUB is valid. There are a couple of squawks here about the fonts. It's saying that there's two fonts embedded in this book that are TTF fonts, so TrueType fonts, and it's saying this is a non-standard font usage. It's not actually an error, it's just a warning, and EPUB-Checker will always warn us when there's a font that's not an OTF font, an OpenType font. This error is a warning, it's not an error, and this is safe to ignore. With experience you'll get more used to what things are safe to ignore, and which are things that you need to fix. This is not something that I need to fix. So EPUB-Checker's super easy to use. It provides some breadcrumbs to what the problem is when there are errors, and will help you sort of do the detective work to track down what's happening in your EPUB. The main message with this validation tool is that you can edit as much as you need to and then rely on this fine piece of software to help you check your work, and to make sure you didn't introduce any new errors.

Contents