[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Marnen Laibow-Koser
Hassan Schroeder wrote: [...] > So make it all valid XHTML and be happy, regardless of whether > you're ultimately serving it as text/html or application/xhtml+xml :-) Not quite. Validate to a DOCTYPE that matches the MIME type that the browser will use to parse the document -- that is, valid

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread John H.
> I will, however, seriously miss being able to use XPath expressions in > my testing code if I go this route (unless they somehow work on HTML, > but I doubt it).  And unclosed singleton tags are really ugly to me > (and always have been, since before I was even aware of XML). Almost every ruby

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Jian Lin
hm... you know what, my coworker had this one line: and the page would still validate perfectly as XHTML, but IE will render it differently from FF. FF will take it as a closing div. IE will not take it as a closing div. so I will have perfectly validated code that behaves differently on tw

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Marnen Laibow-Koser
Lee Smith wrote: > Trying to change the way Rails lays down a stylesheet include is > really a waste of time. Completely wrong. > This HTML vs XHTML syntax only matters if > you're validating... And you should always be validating, because you should always produce valid markup, because that

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread JL Smith
That's exactly why I'm saying not to waste your time...Rails lays it down in XHTML syntax so if he changed the doctype from XHTML specific, then his validation won't work. Hence, don't waste your time changing it if you're not worried about validation. On May 27, 3:27 pm, Hassan Schroeder wrot

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Hassan Schroeder
On Wed, May 27, 2009 at 1:15 PM, Jian Lin wrote: > i think there are time when i actually want to validate my page > output... especially if the page is complicated with layouts and div's. Absolutely -- validation is an essential web developer troubleshooting tool. So make it all valid XHTML an

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Jian Lin
Lee Smith wrote: > Trying to change the way Rails lays down a stylesheet include is > really a waste of time. This HTML vs XHTML syntax only matters if > you're validating...otherwise, the browser renders it as HTML. > > Don't waste your time and definitely update your browser. i think there ar

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread JL Smith
Trying to change the way Rails lays down a stylesheet include is really a waste of time. This HTML vs XHTML syntax only matters if you're validating...otherwise, the browser renders it as HTML. Don't waste your time and definitely update your browser. --~--~-~--~~~---

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Marnen Laibow-Koser
On May 27, 12:03 pm, Rimantas Liubertas wrote: > > Rimantas Liubertas wrote: > > [...] > >> Once again > >> using XML brings nothing to the table if you use text/html. > > > Absolutely untrue.  If nothing else, it brings the use of XML tools to > > test out your markup.  And while people like Hic

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Rimantas Liubertas
> http://github.com/jonleighton/html_output/tree/master > > Best regards > > Peter De Berdt I will take a look, thanks! If this does work it should be in Rails proper, with some config setting… Regards, Rimantas -- http://rimantas.com/ --~--~-~--~~~---~--~~ You r

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Rimantas Liubertas
> Rimantas Liubertas wrote: > [...] >> Once again >> using XML brings nothing to the table if you use text/html. > > Absolutely untrue.  If nothing else, it brings the use of XML tools to > test out your markup.  And while people like Hickson don't seem to > understand the importance of that, the

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Marnen Laibow-Koser
Rimantas Liubertas wrote: [...] > Once again > using XML brings nothing to the table if you use text/html. Absolutely untrue. If nothing else, it brings the use of XML tools to test out your markup. And while people like Hickson don't seem to understand the importance of that, the fact is tha

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Peter De Berdt
On 27 May 2009, at 14:47, Rimantas Liubertas wrote: >> This is a fairly retarded argument. Rails produces an XHTML >> transitional doctype, so it's all irrelevant. > > Did you read? Doctypes are relevant only for rendering modes > swithcing (quirks/standards), not for parsing engines (html/xml)

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Rimantas Liubertas
> This is a fairly retarded argument. Rails produces an XHTML > transitional doctype, so it's all irrelevant. Did you read? Doctypes are relevant only for rendering modes swithcing (quirks/standards), not for parsing engines (html/xml) switching. > If you want your own doctype, then type it in.

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Julian Leviston
This is a fairly retarded argument. Rails produces an XHTML transitional doctype, so it's all irrelevant. If you want your own doctype, then type it in. It's not hard. Julian. -- Learn: http://sensei.zenunit.com/ Last updated 20-May-09 (Rails, Basic

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Rimantas Liubertas
> Wow, where to begin?  Your references are very interesting, but as I > read them, it seems to me that their authors have leapt to conclusions > from a farrago of spurious "facts" and unwarranted assumptions. You can begin by reading apropriate specifications and trying things out. Then you will

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-26 Thread Marnen Laibow-Koser
Rimantas Liubertas wrote: [snip] Wow, where to begin? Your references are very interesting, but as I read them, it seems to me that their authors have leapt to conclusions from a farrago of spurious "facts" and unwarranted assumptions. > It is very unfortunate, that RoR chose this path. Espec

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-26 Thread Rimantas Liubertas
> Not really; the DOCTYPE still tells the browser that it's XHTML. DOCTYPEs do not matter in this case. Browsers do switch rendering modes depending on doctypes, but the only thing that influences the choice of parser is MIME type [1] > Most browsers have no problem.  IE is the exception, sort o

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-26 Thread Marnen Laibow-Koser
SpringFlowers AutumnMoon wrote: > Marnen Laibow-Koser wrote: > >> The idea that it won't be understood is simply false. Leaving aside the >> questionable accuracy of the 66% figure, > > http://en.wikipedia.org/wiki/Usage_share_of_web_browsers Irrelevant. As I already explained, *across-the-

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-26 Thread SpringFlowers AutumnMoon
Marnen Laibow-Koser wrote: > The idea that it won't be understood is simply false. Leaving aside the > questionable accuracy of the 66% figure, http://en.wikipedia.org/wiki/Usage_share_of_web_browsers > it is a fact that all browsers > *do* understand XHTML served as I have outlined above

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-26 Thread Marnen Laibow-Koser
SpringFlowers AutumnMoon wrote: > > mainly, i feel weird using something that 66% of browsers don't > understand... The idea that it won't be understood is simply false. Leaving aside the questionable accuracy of the 66% figure, it is a fact that all browsers *do* understand XHTML served as

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-25 Thread SpringFlowers AutumnMoon
Marnen Laibow-Koser wrote: > Yes it is. HTML is an obsolescent standard, basically simply a matter > of backwards compatibility at this point. XHTML is the way forward, for > reasons I've already explained. If you follow the procedure I have > recommended, XHTML does not even cause problems

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-25 Thread Marnen Laibow-Koser
SpringFlowers AutumnMoon wrote: > Marnen Laibow-Koser wrote: >> SpringFlowers AutumnMoon wrote: >> [...] >>> hm... so the XHTML will just be used as html... >> >> Not really; the DOCTYPE still tells the browser that it's XHTML. > > except IE use it as HTML. Perhaps...but better browsers will un

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-25 Thread SpringFlowers AutumnMoon
Marnen Laibow-Koser wrote: > SpringFlowers AutumnMoon wrote: > [...] >> hm... so the XHTML will just be used as html... > > Not really; the DOCTYPE still tells the browser that it's XHTML. except IE use it as HTML. > and we aim to output it >> as XHTML anyway... >> >> pragmatically, it will

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-25 Thread Marnen Laibow-Koser
SpringFlowers AutumnMoon wrote: [...] > hm... so the XHTML will just be used as html... Not really; the DOCTYPE still tells the browser that it's XHTML. and we aim to output it > as XHTML anyway... > > pragmatically, it will work... i just wonder why we don't just output > what is really bei

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-25 Thread SpringFlowers AutumnMoon
Marnen Laibow-Koser wrote: > The Wikipedia article seems to say that this is not really a problem if > the XHTML is served as text/html, which is what Rails does by default. hm... so the XHTML will just be used as html... and we aim to output it as XHTML anyway... pragmatically, it will work.

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-25 Thread Marnen Laibow-Koser
SpringFlowers AutumnMoon wrote: [...] > I think on SitePoint and StackOverflow.com, they usually say XHTML is > not supported by IE 6, 7, 8. The Wikipedia article seems to say that this is not really a problem if the XHTML is served as text/html, which is what Rails does by default. Therefore,

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-25 Thread SpringFlowers AutumnMoon
Marnen Laibow-Koser wrote: > If I remember correctly, IE *does* support XHTML from version 6, if not > before, so long as you have the proper DOCTYPE declaration. I would > guess that quirksmpde.org would have more information. I think on SitePoint and StackOverflow.com, they usually say XHTM

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-25 Thread Marnen Laibow-Koser
SpringFlowers AutumnMoon wrote: > Marnen Laibow-Koser wrote: >> SpringFlowers AutumnMoon wrote: >>> >>> >>> I would like to use HTML 4.01 Strict, and used a DOCTYPE of it in my >>> application template. >> [...] >> >> Why? XHTML is definitely the way to go these days. > > > coz IE doesn't su

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-25 Thread SpringFlowers AutumnMoon
Marnen Laibow-Koser wrote: > SpringFlowers AutumnMoon wrote: >> >> >> I would like to use HTML 4.01 Strict, and used a DOCTYPE of it in my >> application template. > [...] > > Why? XHTML is definitely the way to go these days. coz IE doesn't support XHTML. So while we use XHTML, we are actu

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-25 Thread Marnen Laibow-Koser
SpringFlowers AutumnMoon wrote: > > > I would like to use HTML 4.01 Strict, and used a DOCTYPE of it in my > application template. [...] Why? XHTML is definitely the way to go these days. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-25 Thread Frederick Cheung
On May 25, 5:48 am, SpringFlowers AutumnMoon wrote: > I would like to use HTML 4.01 Strict, and used a DOCTYPE of it in my > application template. But look like when a style sheet is included by a > helper function > >   <%= stylesheet_link_tag 'style' %> > > the code produced is XHTML: > >