| 
			
			 | 
		#1 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681 
				Karma: 929286 
				Join Date: Apr 2014 
				
				
				
				Device: PW-3, iPad, Android phone 
				
				
				 | 
	
	
	
		
		
			
			 
				
				navpoint ids and epubcheck
			 
			
			
			Epubcheck  complains if the navpoint ids  in the toc.ncx begin with a digit. 
		
	
		
		
		
		
		
		
		
		
		
		
		
			e.g: Code: 
	<navPoint class="chapter" id="23b2a4fa-6968-47cd-a55b-68ec2650ccde" playOrder="3">
      <navLabel>
        <text>A Reminiscence of Dr Samuel Johnson</text>
      </navLabel>
      <content src="Text/story05.html"/>
</navPoint>
So I just prepended an X to all the ids and it passed epubcheck and seemed OK. Code: 
	id="X23b2a4fa-6968-47cd-a55b-68ec2650ccde" Last edited by AlanHK; 09-20-2017 at 06:18 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,892 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			The id attribute is required for the navPoint element. And yes, it must he unique. But it also has to conform to xml standards which require that ids do not start with a digit. The one you're dealing with was auto-generated (a urn guaranteed to be unique) by a program when building the toc. Unfortunately, those generated, unique urns sometimes start with number. I honestly don't know that they are "used" per se. 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Sigil used to be susceptible to generating invalid ids like that, but that bug was fixed a while back. At least I think it was. At the time, the bugfix was about opf manifest ids rather than toc ids, but I assume the fix was applied to a general id-generating utility function. Last edited by DiapDealer; 09-20-2017 at 09:03 AM.  | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Sigil Developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,072 
				Karma: 6361556 
				Join Date: Nov 2009 
				
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I think the routine we touched only dealt with manifest ids.  We should at least look how the toc ids and nav ids are generated to verify they have the same fix.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Sigil Developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,072 
				Karma: 6361556 
				Join Date: Nov 2009 
				
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Okay I checked src/Exporters/NCXWriter.cpp 
		
	
		
		
		
		
		
		
		
		
		
		
		
			and we use: m_Writer->writeAttribute("id", QString("navPoint-%1").arg(play_order)); So guaranteed to not begin with a digit. We do similar things in python3lib/ncxgenerator.py so our auto conversion routines from nav to ncx should be fine there. I also checked the nav for epub3: src/ResourceObjects/NavProcessor.cpp and it does not use "id" in a similar manner so we are okay there as well. I did see lots of calls to Gumbo's get_local_text_of_node() and there are no calls to simplified so we should probably add some simplify calls to the NavProcessor.cpp every time we use get_local_text_of_node just to be safe. That said a newline in an html document will just become a space and multiple spaces are condensed in html, so for the nav this may not matter too much. Last edited by KevinH; 09-20-2017 at 11:46 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,892 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I think the .simplified() additions I just pushed the other day (in Headings.cpp) are pretty central to all toc/nav production, but more wouldn't really hurt anything either. 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Thanks for looking at the id generation. I didn't think uids were being introduced in the ncx that way, but I couldn't remember for sure. Last edited by DiapDealer; 09-20-2017 at 11:57 AM.  | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | ||
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,763 
				Karma: 24088559 
				Join Date: Dec 2010 
				
				
				
				Device: Kindle PW2 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Since you're looking at the NCX code, according to the epub 2.0.1. specs: 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Quote: 
	
 Quote: 
	
 I.e., if you didn't include the ncx-2005-1.dtd DOCTYPE declaration, you could also remove the playOrder attributes, which should theoretically simplify NCX updates.  | 
||
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Sigil Developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,072 
				Karma: 6361556 
				Join Date: Nov 2009 
				
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			@Doitsu 
		
	
		
		
		
		
		
		
		
		
		
		
	
	We actually use the playorder to generate the ids from. To change that now would be more work for no increase in validity.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681 
				Karma: 929286 
				Join Date: Apr 2014 
				
				
				
				Device: PW-3, iPad, Android phone 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I know that Sigil doesn't make such ids in an epub it creates, but this was one I cannibalised; no idea what made it to begin with. 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Anyway, wanted to confirm that nothing actually refers to this id, so I won't break anything if I change them as I did to shut epubcheck up. Last edited by AlanHK; 09-21-2017 at 01:16 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,892 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  
		 | 
|
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681 
				Karma: 929286 
				Join Date: Apr 2014 
				
				
				
				Device: PW-3, iPad, Android phone 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			When it's giving me dozens of errors like this, I might miss the "real" errors that do have impact. (I wish there was a way to tell it to ignore specific errors.) 
		
	
		
		
		
		
		
		
		
		
		
		
	
	And while this one is just a personal project, if you are doing it for a client, passing Epubcheck may be a requirement.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 Witchman 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628 
				Karma: 788808 
				Join Date: May 2013 
				Location: Philippines 
				
				
				Device: Android S5 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I've run into this issue before with the unique book id starting with a digit in the opf manifest that Kevin or DiapDealer fixed some while ago. I was the one who reported this problem way back when. What disappoints me is that when I just tested this current problem, Epupcheck still gives this weird error message for wrong ids in the toc.ncx: 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Col: 72: ERROR(RSC-005): Error while parsing file 'value of attribute "id" is invalid; must be an XML name without colons'. This error message would be highly confusing for any indie guy trying to get his book to pass Epubcheck. That error message tells you nothing whatsover about the problem and is highly misleading. Just a suggestion, but would it be possible to implement a simple change in Sigil where, on opening any epub in Sigil, an automatic check of all the unique ids in the toc.ncx(with a helpful error message for the user if an id incorrectly starts with a digit)? Or another alternative would be to just update the Mend XHTML Source... feature to actually repair this problem automatically if it is found. I also realize that this problem has nothing to do with Sigil -- I'm only suggesting a solution that would perhaps help other Sigil users with this problem in the future. Last edited by slowsmile; 09-25-2017 at 08:44 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#12 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,892 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			No, we're not going to repair invalid ids automatically, and Sigil is no longer in the epub validation game itself. Validation is done by plugins. If you consider Epubcheck's error message to be unhelpful, you should consider reporting this to the Epubcheck developers.  
		
	
		
		
		
		
		
		
		
		
		
		
	
	Sigil's validation plugin framework offers plugin developers a way to create their own error-checking routines that go above and beyond what EpubCheck looks for (or how it describes a problem). Perhaps you can convince one to compile a list of extra checks/warnings into plugin that might be more helpful to neophytes.  | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#13 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,763 
				Karma: 24088559 
				Join Date: Dec 2010 
				
				
				
				Device: Kindle PW2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Since you can use both Calibre Editor and Sigil, there's no point in adding this feature to Sigil.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#14 | 
| 
			
			
			
			 Witchman 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628 
				Karma: 788808 
				Join Date: May 2013 
				Location: Philippines 
				
				
				Device: Android S5 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I've just reported the Epubcheck uuid error message problem on the IDPF Epubcheck issues list on Git Hub(Issue #795).  
		
	
		
		
		
		
		
		
		
		
		
		
		
			@Doitsu...Thanks for your info, which was quite useful to know. Last edited by slowsmile; 09-26-2017 at 12:58 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#15 | ||
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681 
				Karma: 929286 
				Join Date: Apr 2014 
				
				
				
				Device: PW-3, iPad, Android phone 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Also found this discussion on GitHub https://github.com/IDPF/epubcheck/is...ment-151267599 Quote: 
	
 As above, this has been reported there at least 5 times already, but it's a "wontfix". Last edited by AlanHK; 09-26-2017 at 01:53 AM.  | 
||
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
| Thread Tools | Search this Thread | 
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| navPoint ID | bookwurm70 | Editor | 5 | 06-03-2014 12:39 AM | 
| Wohin gehört NavPoint „Anfang“? | praetor | Lounge | 3 | 11-09-2012 04:25 PM | 
| Web-based epubcheck upgraded to epubcheck 1.0.5 | kjk | ePub | 4 | 02-09-2010 10:53 PM | 
| Nested navPoint problem | Lemming | Calibre | 3 | 12-20-2009 12:24 PM |