layout confusion

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

layout confusion

jacktanner
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?
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: layout confusion

L. David Baron
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

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: layout confusion

boards (Bugzilla)
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

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout

attachment0 (198 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: layout confusion

jacktanner
In reply to this post by jacktanner
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?
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: layout confusion

boards (Bugzilla)
On Wednesday 27 September 2006 10:39 pm, Jack Tanner wrote:

> 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?
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

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout

attachment0 (198 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: layout confusion

Ian Hickson
In reply to this post by jacktanner
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.   `._.-(,_..'--(,_..'`-.;.'
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: layout confusion

Bjoern Hoehrmann
In reply to this post by jacktanner
* 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:[hidden email] · 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/ 
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout