Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-20-2012, 05:51 PM   #1
lkasdorf
Junior Member
lkasdorf began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2012
Device: none
named anchors fail validation in sigil

I am using Sigil 0.5.3

When I create the TOC, it generates named anchors for each of the targeted headers. It uses the "name" attribute of the anchor tag. However, when I click the green check to validate, it complains that "name" is not a valid attribute for an anchor (which is incorrect).

It turns out that you can use "id" the same way you use "name" in an anchor. And if I change all the named anchors to id from name, the validate works fine.

I realize that the verify library was not written by the sigil authors- however, I'm surprised that sigil generates TOC code that does not pass validation.
lkasdorf is offline   Reply With Quote
Old 04-20-2012, 07:18 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,570
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by lkasdorf View Post
I am using Sigil 0.5.3

When I create the TOC, it generates named anchors for each of the targeted headers. It uses the "name" attribute of the anchor tag. However, when I click the green check to validate, it complains that "name" is not a valid attribute for an anchor (which is incorrect).

It turns out that you can use "id" the same way you use "name" in an anchor. And if I change all the named anchors to id from name, the validate works fine.

I realize that the verify library was not written by the sigil authors- however, I'm surprised that sigil generates TOC code that does not pass validation.
I'm fairly certain Sigil doesn't auto-generate any code with a "name" attribute. It never has for me anyway. The only TOC related stuff that Sigil auto-generates is the NCX file. It doesn't auto-create any anchors that I know of... let alone anchors with a "name" attribute. Outside of the NCX file, generating a TOC with Sigil will only modify/create the IDs of existing header tags. Are you sure those named anchors weren't already there before Sigil got a hold of the code?

Last edited by DiapDealer; 04-20-2012 at 07:43 PM.
DiapDealer is online now   Reply With Quote
Advert
Old 04-20-2012, 10:55 PM   #3
lkasdorf
Junior Member
lkasdorf began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2012
Device: none
Got it- thanks! I'm converting a word manuscript to ebook for someone. I was given a word file in which the author had generated a TOC. I pasted from word into word2cleanhtml.com and got "clean" html which I brought into sigil. The named anchors were put there by word apparently.

The author wanted a list of figures and I hand built links to named anchors, and it bitched about those as well until I converted to id from name.

The fog is lifting...thanks
lkasdorf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anchors in posts? unboggling Feedback 16 05-17-2015 03:18 PM
Anchors look like links in ADE? BKh Workshop 8 01-29-2012 03:19 PM
Need help with Sigil validation error wraylewis Sigil 8 12-21-2011 02:46 PM
ePub Validation Fail after Sigil edit dm1839 Sigil 7 10-16-2011 07:59 PM
Sigil epub validation sassanik Sigil 0 01-25-2011 11:58 AM


All times are GMT -4. The time now is 06:16 AM.


MobileRead.com is a privately owned, operated and funded community.