Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 11-16-2011, 07:52 PM   #1
JoanneM
Member
JoanneM began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Nov 2011
Device: noone
element 'a' is not allowed for content model div

I'm getting this error in my epub:

element 'a' is not allowed for content model '(p|h1|h2|h3|h4|h5|h6|div|ul|ol|dl|pre|hr|blockquo te|address|fieldset|table|switch|form|noscript|ins |del|script)'

in cases where I've got:

<div>Words words <a href="#link">link</a> words <a href="#anotherlink">anotherlink</a> words.</div>

How do I fix this? Thanks!
JoanneM is offline   Reply With Quote
Old 11-16-2011, 08:19 PM   #2
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by JoanneM View Post
I'm getting this error in my epub:

element 'a' is not allowed for content model '(p|h1|h2|h3|h4|h5|h6|div|ul|ol|dl|pre|hr|blockquo te|address|fieldset|table|switch|form|noscript|ins |del|script)'

in cases where I've got:

<div>Words words <a href="#link">link</a> words <a href="#anotherlink">anotherlink</a> words.</div>

How do I fix this? Thanks!
change <div> to <p>. Div should only be used as a last resort.

Dale
DaleDe is offline   Reply With Quote
Advert
Old 11-17-2011, 05:08 AM   #3
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I've never had any problem using <a> inside <div>, and the books validated fine. Has this changed lately?
Jellby is offline   Reply With Quote
Old 11-20-2011, 01:25 PM   #4
JoanneM
Member
JoanneM began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Nov 2011
Device: noone
I've changed all the <div>s to <p>s... and am still getting the error:

element 'a' is not allowed for content model '(p|h1|h2|h3|h4|h5|h6|div|ul|ol|dl|pre|hr|blockquo te|address|fieldset|table|switch|form|noscript|ins |del|script)'

Flightcrew says the error is at line 2873, which is the second-to-last line of my html document and just says:
</body>

I don't understand how it could be a problem to have <a> inside <p>. Here are some the ways I've done that:


<p class="toc"><a href="#ch1">Chapter One</a></p>

and


<p class="fiction">In 2001, she quit her job as the Executive Assistant of the <a href="http://writers.ns.ca/">Writers' Federation of Nova Scotia</a> to travel Canada by train, and then parts of the Northeastern and Southern United States.</p>


How could those be wrong? V. confused. Any help would be appreciated.
JoanneM is offline   Reply With Quote
Old 11-20-2011, 02:26 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,768
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Flightcrew reports the last line (of resort) when it runs into a error like this.
Something before did not close properly. Usually <blockquotes> without containing <p> or Naked <br /> (must be inside a tag pair).
theducks is offline   Reply With Quote
Advert
Old 11-21-2011, 04:22 AM   #6
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Are you sure you closed everything correctly in the right order? If you are able to post the part that gives the issue, we might find out. I am convinced it is trivial.
Toxaris is offline   Reply With Quote
Old 11-22-2011, 11:12 PM   #7
JoanneM
Member
JoanneM began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Nov 2011
Device: noone
Quote:
Originally Posted by theducks View Post
Flightcrew reports the last line (of resort) when it runs into a error like this.
Something before did not close properly. Usually <blockquotes> without containing <p> or Naked <br /> (must be inside a tag pair).
That was exactly the problem - thanks!
JoanneM is offline   Reply With Quote
Reply

Tags
epub, flightcrew

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
element "img" not allowed in this context graniton Calibre 5 05-14-2012 11:39 PM
ePub errors (attribute-type, element, text-not-allowed thiefwriter ePub 5 09-17-2011 11:02 AM
element "span" not allowed in this context jihwan Calibre 4 07-17-2010 09:25 PM
Subscription model for content JHeavner Sony Reader 9 02-09-2007 10:46 AM
Should big firms be allowed to censor news content? Alexander Turcic Lounge 0 01-27-2005 07:40 AM


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


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