It''s not a critical bug by any means, but shouldn''t InPlaceEditor put DIV tags around the INPUT field? From what I can tell on the W3C validator, INPUT has to be in a block-level tag for XHTML. Of course, there are probably a zillion other things that wouldn''t validate, but every little step helps... Corollary question: Anyone know how to see what contexts a tag is legal in, other than trying the validator? Even reading the spec I can''t quite tell. Jay
The INPUT field is in a FORM field. Isn''t it valid to have an INPUT field in a FORM tag? Cheers, Jon On 10/28/05, Jay Levitt <lists-railspin-Qa00cJl5so0dYYaOPf09RA@public.gmane.org> wrote:> It''s not a critical bug by any means, but shouldn''t InPlaceEditor put > DIV tags around the INPUT field? From what I can tell on the W3C > validator, INPUT has to be in a block-level tag for XHTML. Of course, > there are probably a zillion other things that wouldn''t validate, but > every little step helps... > > Corollary question: Anyone know how to see what contexts a tag is legal > in, other than trying the validator? Even reading the spec I can''t > quite tell. > > Jay > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Jon Tirsen wrote:>The INPUT field is in a FORM field. Isn''t it valid to have an INPUT >field in a FORM tag? > >Apparently not - INPUT is an inline tag, and it needs to appear inside a block tag, which FORM doesn''t count as. Yeah, I know, it''s always worked for me, too.. :) Jay>Cheers, >Jon > >On 10/28/05, Jay Levitt <lists-railspin-Qa00cJl5so0dYYaOPf09RA@public.gmane.org> wrote: > > >>It''s not a critical bug by any means, but shouldn''t InPlaceEditor put >>DIV tags around the INPUT field? From what I can tell on the W3C >>validator, INPUT has to be in a block-level tag for XHTML. Of course, >>there are probably a zillion other things that wouldn''t validate, but >>every little step helps... >> >>Corollary question: Anyone know how to see what contexts a tag is legal >>in, other than trying the validator? Even reading the spec I can''t >>quite tell. >> >>Jay >> >>_______________________________________________ >>Rails-spinoffs mailing list >>Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >> >> >_______________________________________________ >Rails-spinoffs mailing list >Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On 10/28/05, Jay Levitt <lists-railspin-Qa00cJl5so0dYYaOPf09RA@public.gmane.org> wrote:> Jon Tirsen wrote: > The INPUT field is in a FORM field. Isn''t it valid to have an INPUT > field in a FORM tag? > > Apparently not - INPUT is an inline tag, and it needs to appear inside a > block tag, which FORM doesn''t count as. Yeah, I know, it''s always worked > for me, too.. :)INPUT is an inline element. FORM is a block element. Aside from this, there is simply no requirement that inline elements must appear inside a block element. The outer element defines which elements it can contain. So it is the other way around. In the case of the FORM element, it can contain any ''flow'' element. ''Flow'' elements are a collection of all block and inline elements. So the FORM element can legally contain an INPUT element. Niels niels.leenheer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
So that means the InPlaceEditor is producing valid XHTML right? On 11/1/05, Niels Leenheer <niels.leenheer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 10/28/05, Jay Levitt <lists-railspin-Qa00cJl5so0dYYaOPf09RA@public.gmane.org> wrote: > > Jon Tirsen wrote: > > The INPUT field is in a FORM field. Isn''t it valid to have an INPUT > > field in a FORM tag? > > > > Apparently not - INPUT is an inline tag, and it needs to appear inside a > > block tag, which FORM doesn''t count as. Yeah, I know, it''s always worked > > for me, too.. :) > > INPUT is an inline element. FORM is a block element. > > Aside from this, there is simply no requirement that inline elements > must appear inside a block element. The outer element defines which > elements it can contain. So it is the other way around. > > In the case of the FORM element, it can contain any ''flow'' element. > ''Flow'' elements are a collection of all block and inline elements. So > the FORM element can legally contain an INPUT element. > > Niels > niels.leenheer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
On 10/31/05, Jon Tirsen <jon-fQK1VBTDpnXQT0dZR+AlfA@public.gmane.org> wrote:> So that means the InPlaceEditor is producing valid XHTML right? > > On 11/1/05, Niels Leenheer <niels.leenheer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On 10/28/05, Jay Levitt <lists-railspin-Qa00cJl5so0dYYaOPf09RA@public.gmane.org> wrote: > > > Jon Tirsen wrote: > > > The INPUT field is in a FORM field. Isn''t it valid to have an INPUT > > > field in a FORM tag? > > > > > > Apparently not - INPUT is an inline tag, and it needs to appear inside a > > > block tag, which FORM doesn''t count as. Yeah, I know, it''s always worked > > > for me, too.. :) > > > > INPUT is an inline element. FORM is a block element. > > > > Aside from this, there is simply no requirement that inline elements > > must appear inside a block element. The outer element defines which > > elements it can contain. So it is the other way around. > > > > In the case of the FORM element, it can contain any ''flow'' element. > > ''Flow'' elements are a collection of all block and inline elements. So > > the FORM element can legally contain an INPUT element.HTML Transitional allows inputs in FORMs, but HTML Strict does not: Contents * In HTML 4.0 Strict, one or more SCRIPT or block-level elements except FORM * In HTML 4.0 Transitional, inline elements or block-level elements except FORM http://htmlhelp.com/reference/html40/forms/form.html Looking at the actual DTDs for XHTML: <!ENTITY % form.content "(%block; | %misc;)*"> http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-strict.dtd_misc <!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*"> http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Transitional -- rick http://techno-weenie.net
> HTML Transitional allows inputs in FORMs, but HTML Strict does not: > > Contents > * In HTML 4.0 Strict, one or more SCRIPT or block-level elements except FORM > * In HTML 4.0 Transitional, inline elements or block-level elements > except FORM > http://htmlhelp.com/reference/html40/forms/form.html > > Looking at the actual DTDs for XHTML: > > <!ENTITY % form.content "(%block; | %misc;)*"> > http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-strict.dtd_misc > > <!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*"> > http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-TransitionalThat''s harsh! Okay, if anybody wants XHTML strict compliance please create an issue in http://dev.rubyonrails.com. Cheers, Jon