From 9041ef42f9e0a5c4bc3b0a912d36683c4e10ca84 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 8 Aug 2017 17:39:18 +0200 Subject: [PATCH 3/3] EPUBHTMLManager: fix value of "8.4.3 playOrder Attribute" says: playOrder is a positive integer; the first playOrder value in a document shall be 1. So instead of writing an empty attribute, write the same number that's already used for . --- src/lib/EPUBHTMLManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/EPUBHTMLManager.cpp b/src/lib/EPUBHTMLManager.cpp index e5add82..03dbf21 100644 --- a/src/lib/EPUBHTMLManager.cpp +++ b/src/lib/EPUBHTMLManager.cpp @@ -75,7 +75,9 @@ void EPUBHTMLManager::writeTocTo(EPUBXMLSink &sink, const EPUBPath &tocPath) id << "section" << (i + 1); navPointAttrs.insert("id", id.str().c_str()); navPointAttrs.insert("class", "document"); - navPointAttrs.insert("playOrder", ""); + std::ostringstream playOrder; + playOrder << (i + 1); + navPointAttrs.insert("playOrder", playOrder.str().c_str()); sink.openElement("navPoint", navPointAttrs); sink.openElement("navLabel"); sink.openElement("text"); -- 2.12.3