Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

layout confusion

5 views
Skip to first unread message

Jack Tanner

unread,
Sep 27, 2006, 11:09:03 PM9/27/06
to
Warning: newbie question.

This may be a bug in Wordpress, or it may be my misunderstanding of
plain ol' XHTML; it affects both Gecko and IE.

A user wrote a post using the Wordpress editing interface, which
generated the following XHTML.

<div id="1"><p><strong /></p></div>
<div id="2">...</div>

Note that <strong /> -- it makes Firefox 1.5.0.7 generate this DOM:

<div id="1"><p><strong></strong></p></div>
<div id="2"><strong>...</strong></div>

That is, using an inline element in the first div influences the DOM
generated in the second div. Isn't that wrong?

L. David Baron

unread,
Sep 27, 2006, 11:12:37 PM9/27/06
to dev-tec...@lists.mozilla.org
On Wednesday 2006-09-27 23:09 -0400, Jack Tanner wrote:
> This may be a bug in Wordpress, or it may be my misunderstanding of
> plain ol' XHTML; it affects both Gecko and IE.

If you're serving XHTML as text/html (which means browsers handle it as
HTML, not XHTML), you have to follow the guidelines in Appendix C of
XHTML 1.0, which this does not:

> <div id="1"><p><strong /></p></div>

-David

--
L. David Baron <URL: http://dbaron.org/ >
Technical Lead, Layout & CSS, Mozilla Corporation

Matt Sicker

unread,
Sep 27, 2006, 11:26:48 PM9/27/06
to dev-tec...@lists.mozilla.org
On Wednesday 27 September 2006 10:12 pm, L. David Baron wrote:
> On Wednesday 2006-09-27 23:09 -0400, Jack Tanner wrote:
> > This may be a bug in Wordpress, or it may be my misunderstanding of
> > plain ol' XHTML; it affects both Gecko and IE.
>
> If you're serving XHTML as text/html (which means browsers handle it
> as HTML, not XHTML), you have to follow the guidelines in Appendix C
> of
>
> XHTML 1.0, which this does not:
> > <div id="1"><p><strong /></p></div>
>
> -David
What he said. You need to force it as XML of some sort
(application/xhtml+xml in this case); otherwise, you get tag soup mode.
--
Matt Sicker

Jack Tanner

unread,
Sep 27, 2006, 11:39:02 PM9/27/06
to
L. David Baron wrote:
> If you're serving XHTML as text/html (which means browsers handle it as
> HTML, not XHTML), you have to follow the guidelines in Appendix C of
> XHTML 1.0, which this does not:
>
>> <div id="1"><p><strong /></p></div>

Yes, I am serving it as text/html.

In case it would be a point of interest, the W3 validator accepted it as
XHTML transitional.

I suppose I should go file a bug in Wordpress re: Appendix C. I'm
assuming you're referring to Appendix C.3?

Matt Sicker

unread,
Sep 28, 2006, 11:44:30 AM9/28/06
to dev-tec...@lists.mozilla.org
Like I said, you need to serve as application/xhtml+xml if you want that
sort of XML functionality to work. I'd recommend not using that unless
you can dynamically change it based on whether or not you're serving
XML.
--
Matt Sicker

Ian Hickson

unread,
Sep 28, 2006, 2:47:34 PM9/28/06
to Jack Tanner, dev-tec...@lists.mozilla.org
On Wed, 27 Sep 2006, Jack Tanner wrote:
>
> In case it would be a point of interest, the W3 validator accepted it as
> XHTML transitional.

Yeah, that's a bug in the validator (bug 1500, if you care).

--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'

Bjoern Hoehrmann

unread,
Sep 28, 2006, 4:16:52 PM9/28/06
to
* Ian Hickson wrote in mozilla.dev.tech.layout:

>On Wed, 27 Sep 2006, Jack Tanner wrote:
>
>> In case it would be a point of interest, the W3 validator accepted it as
>> XHTML transitional.
>
>Yeah, that's a bug in the validator (bug 1500, if you care).

The bug there is the HTML Working Group, not the Validator...
--
Björn Höhrmann · mailto:bjo...@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

0 new messages