Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-11-2013, 01:40 PM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Does <blockquote> need <p> tags?

Does <blockquote> need <p> tags? I've seen the <p>-less constructs many times cleaning up PD books, so it seems to be a common thing.

This displays OK in Sigil, but the <p>-less <blockquote> generates a "no character data is allowed by content model". I usually try to eliminate as many errors as possible even if they don't matter, just to avoid missing an important one.

Code:
<body>
  <p>This is OK text with p tags</p>

  <blockquote>
    This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags
  </blockquote>

  <blockquote>
    <p>This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags</p>
  </blockquote>

  <p>This is OK text also with p tags</p>
</body>
I did try some variations of a RegEx, but no luck (this is also a learning area for me)

F: (<blockquote>)!(<p>)(.*)!(</p>)(</blockquote>)
R: <blockquote><p>\3</p><blockquote>

Making sure that there's a question,

1. Are <p> required?
2. What would be the correct RegEx to use so as to avoid the error messages?

Paul
phossler is offline   Reply With Quote
Old 05-11-2013, 02:08 PM   #2
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
Quote:
Originally Posted by phossler View Post
1. Are <p> required?
In HTML? No
In XHTML, and therefore in ePub? Yes (well, no... they could be <div>s instead, but a block-level element anyway)
Jellby is offline   Reply With Quote
Advert
Old 05-11-2013, 02:40 PM   #3
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Yes, I always use them with <div> and that works fine.
HarryT is offline   Reply With Quote
Old 05-11-2013, 04:40 PM   #4
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,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by phossler View Post
Does <blockquote> need <p> tags? I've seen the <p>-less constructs many times cleaning up PD books, so it seems to be a common thing.

This displays OK in Sigil, but the <p>-less <blockquote> generates a "no character data is allowed by content model". I usually try to eliminate as many errors as possible even if they don't matter, just to avoid missing an important one.

Code:
<body>
  <p>This is OK text with p tags</p>

  <blockquote>
    This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags This is block quoted and there are no p tags
  </blockquote>

  <blockquote>
    <p>This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags This is block quoted and there are p tags</p>
  </blockquote>

  <p>This is OK text also with p tags</p>
</body>
I did try some variations of a RegEx, but no luck (this is also a learning area for me)

F: (<blockquote>)!(<p>)(.*)!(</p>)(</blockquote>)
R: <blockquote><p>\3</p><blockquote>

Making sure that there's a question,

1. Are <p> required?
2. What would be the correct RegEx to use so as to avoid the error messages?

Paul
UPDATED to fix possible wrap issue

My 'Naked' BQ w/Calibre class)

Code:
Find= (?m)<blockquote class="calibre(\d+)">\s+([[:alnum:]].+?[[:alnum:]])\s+</blockquote>
Replace= <blockquote class="calibre\1"><div>\2</div></blockquote>

Last edited by theducks; 05-11-2013 at 05:06 PM. Reason: Updated
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blockquote problem kamanza Conversion 2 01-20-2013 12:19 PM
blockquote grievance Kamikuza Amazon Kindle 4 11-04-2012 07:03 PM
Amazon Tags - Popular tags vs Unique tags. chrisanthropic Writers' Corner 6 09-19-2011 11:18 PM
blockquote over ride dicknskip Sigil 3 03-21-2011 04:44 PM
FBReader blockquote minigrrl PocketBook 3 03-09-2010 08:09 PM


All times are GMT -4. The time now is 06:34 PM.


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