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, 02:40 PM   #1
phossler
Addict
phossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensionsphossler can understand the language of future parallel dimensions
 
Posts: 360
Karma: 51406
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, 03: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,259
Karma: 4801167
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
Old 05-11-2013, 03: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: 65,025
Karma: 43118253
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
Yes, I always use them with <div> and that works fine.
HarryT is offline   Reply With Quote
Old 05-11-2013, 05: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: 15,100
Karma: 5939999
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 06: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 01:19 PM
blockquote grievance Kamikuza Amazon Kindle 4 11-04-2012 08:03 PM
Amazon Tags - Popular tags vs Unique tags. chrisanthropic Writers' Corner 6 09-20-2011 12:18 AM
blockquote over ride dicknskip Sigil 3 03-21-2011 05:44 PM
FBReader blockquote minigrrl PocketBook 3 03-09-2010 09:09 PM


All times are GMT -4. The time now is 05:47 PM.


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