W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2002

Re: [Tidy-dev] Request: a 'strip-presentation' option

From: Lee Passey <lee@dysfunctionals.org>
Date: Thu, 10 Oct 2002 12:42:07 -0600
Message-ID: <3DA5C9FF.2030007@dysfunctionals.org>
To: Tidy-develop@lists.sourceforge.net
CC: html-tidy@w3.org



Jelks Cabaniss wrote:

> I wrote:
> 
> 
>>	strip-presentation: yes/[NO]
>>
>>option (or similar idea) would be extremely useful.  And 
>>rather than have to set *two* options -- like 'clean' and 
>>'drop-font-tags', which you currently have to set to get even 
>>part of the way there -- it should be a "one size kills all": 
>> get rid of all FONT & CENTER elements, ALIGN, BGCOLOR, & 
>>BACKGROUND attributes etc., and *not* replacing them with 
>>CLASS attributes and *not* creating an embedded style section.
>>
> 
> Ideally this option should also remove the extraneous
> 
> 	<p>&nbsp;</p>
> 
> which often litter our otherwise nicely Tidy'ied documents.
> 
> 
> /Jelks
> 

Absolutely not.  This raises an issue that I would like to get some 
feedback on.

I am heavily involved in the production of electronic-books (e-books). 
The leading specification for e-books is that produced by the Open eBook 
Forum (http://www.openebook.org/oebps/index.htm).  The Open eBook 
Publication Structure Specification calls for content in a form which 
is, for all intents and purposes, XHTML.

Now when I read fiction I prefer to have my paragraphs single spaced, 
with the first line indented, just like books currently do.  This can 
easily be achieved by the use of the following style specification:

p { text-indent: 2em; margin:0em; }

Books will frequently have a break on a page which does not indicate a 
chapter break, but simply a change in perspective, scene, or the passage 
of time.  I could indicate these breaks with a <br /> tag, but as soon 
as the document is viewed by someone who does not use my same style 
sheet the page break is lost.  OTOH, if I use two <br /> tags the page 
break becomes too large for small display devices (such as PDAs).  The 
almost empty paragraph (<p>&nbsp;</p>) solves this problem nicely as its 
margins will vary according to the style sheet just as normal paragraphs 
will.

Currently, the behavior of tidy is to replace empty paragraphs with 
_two_ <br /> tags when the "drop-empty-paras:" is set to false (not the 
default value).  This causes the document to have the same presentation 
only when used in browsers without style sheet modifications, and not 
necessarily in other User Agents.

I would like to modify tidy to cause empty paragraphs (<p></p>) to be 
replaced with almost empty paragraphs (<p>&nbsp;</p>).

Any objections?
Received on Thursday, 10 October 2002 14:43:07 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:39:48 UTC