W3C home > Mailing lists > Public > www-html@w3.org > April 2000

Re: Ignoring empty paragraphs

From: Ian Graham <igraham@smaug.java.utoronto.ca>
Date: Sun, 9 Apr 2000 17:14:33 -0400
To: "www-html@w3.org" <www-html@w3.org>
Message-ID: <Pine.SGI.4.05.10004091712210.8362-100000@smaug.java.utoronto.ca>

 [ Sorry if this is a duplicate message -- I believe I responded
  to the original posting using an account that is not authorized
  to post here ]

On Sun, 9 Apr 2000, Tantek [ISO-8859-1] Çelik wrote:

> From: Ian Graham <igraham@smaug.java.utoronto.ca>
> Date: Sun, Apr 9, 2000, 12:31 PM
> 
> > On Sun, 9 Apr 2000, Jan Roland Eriksson wrote:
> >
> >> What about "styling" of non existing content?
> >> Leave that no-content element dangling in the DOM tree and we need to
> >> move the decision not to style it to the CSS renderer instead.
> >>
> >> If not, we will not have a way to discourage the use of successive
P's
> >> for vertical spacing, and that is what I think David's question was
all
> >> about.
> >>
> >
> > If that is the question (it seems a good one), then the problem would
> > appear to be much harder, since what you really want is conditional
> > formatting properties depending on whether 'some' elements contain
> > only ignorable white space (in the XML sense). But HTML is not XML,
and I
> > don't think HTML parsers can flag this difference.
> 
> There is no such thing as ignorable white space (in any sense, HTML, 
XML,
> WXYZML, whatever) for a complete CSS1 implementation because you can
always
> have rules with white-space:pre:
> 
> * {white-space:pre}  /* Note: '*' is a commonly implemented CSS-2
selector */
> 

Sorry, loose wording in my part.  More precisely, I mean the effect of
setting xml:space on an XML application: some applications interpret
xml:space="default" to mean that 'non-significant' white space can be
ignored.  For example, the XML processor on IE5 by default converts the
markup

<elem>      </elem> 

into a DOM element node without text content, since the white space inside
the element is not significant. This can be changed either by setting a
property of the parser object (I've forgotten the name of it), or (I
would expect) by setting xml:space="preserve".  

Now I may be wrong, but if the XML is processed into the DOM tree before
formatting is attached to the nodes, then setting a CSS white-space
property wouldn't have any effect, since the text is already gone....

Ian
Received on Sunday, 9 April 2000 17:14:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:43 GMT