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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-11-2013, 01:40 PM   #1
phossler
Addict
phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 332
Karma: 50154
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: kindle
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: 6,197
Karma: 4800739
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 online now   Reply With Quote
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: 64,024
Karma: 42472847
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Kobo H2O, N7
Yes, I always use them with <div> and that works fine.
HarryT is online now   Reply With Quote
Old 05-11-2013, 04:40 PM   #4
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: 14,870
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:52 AM.


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