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, 08: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, 09: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: 9,743
Karma: 5072190
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
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
 
Advertisement
Old 11-17-2011, 06: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: 6,257
Karma: 4801165
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, 02: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, 03:26 PM   #5
theducks
Grand Sorcerer
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: 15,086
Karma: 5939999
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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 online now   Reply With Quote
Old 11-21-2011, 05: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: 3,097
Karma: 5658305
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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-23-2011, 12:12 AM   #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-15-2012 12:39 AM
ePub errors (attribute-type, element, text-not-allowed thiefwriter ePub 5 09-17-2011 12:02 PM
element "span" not allowed in this context jihwan Calibre 4 07-17-2010 10:25 PM
Subscription model for content JHeavner Sony Reader 9 02-09-2007 11:46 AM
Should big firms be allowed to censor news content? Alexander Turcic Lounge 0 01-27-2005 08:40 AM


All times are GMT -4. The time now is 12:35 AM.


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