Forum: Ruby on Rails xhtml, which do you use with rails?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7b758036ee8c370652514421b04d3f96?d=identicon&s=25 nick (Guest)
on 2007-01-01 00:35
hi, which version of xhtml (or html) do you use with rails? (1.0/1.1,
strict, transitional, frame)
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (Guest)
on 2007-01-01 00:44
(Received via mailing list)
Hi, you can use XHTML 1.0/1.1 or HTML 4.01.  It really depends on what
browsers you'll support and it's different for everyone.

Good luck,

-Conrad
2a8b3ea15e6a7c2d49d8554c2b58a1d9?d=identicon&s=25 BJ Clark (Guest)
on 2007-01-01 01:06
(Received via mailing list)
Nick,
The use of rails doesn't effect your doctypes.
See this article for a clear explanation on the difference between
strict vs. transitional doctypes and their proper uses:
http://24ways.org/2005/transitional-vs-strict-markup

Best,
BJ Clark
7b758036ee8c370652514421b04d3f96?d=identicon&s=25 nick (Guest)
on 2007-01-01 01:20
Conrad Taylor wrote:
> Hi, you can use XHTML 1.0/1.1 or HTML 4.01.  It really depends on what
> browsers you'll support and it's different for everyone.
>
> Good luck,
>
> -Conrad

It's a good question, i want to support many browsers as possible :)
so xhtml 1.1 it's gone because IE doesn't support it
Now is between xhtml 1.0 (served ad html...but in this case, which are
the benefits to use xhtml?) or html 4.01


@BJ Clark: thanks
5233478c51a92b6a1a5c970cbf3a42f3?d=identicon&s=25 Isak Hansen (Guest)
on 2007-01-01 15:31
(Received via mailing list)
On 1/1/07, nick <rails-mailing-list@andreas-s.net> wrote:
> Now is between xhtml 1.0 (served ad html...but in this case, which are
> the benefits to use xhtml?)

Use a before_filter in your application controller to set the headers
correctly.
Something like:

  def set_encoding
    if request.env["HTTP_ACCEPT"] &&
request.env["HTTP_ACCEPT"].index('application/xhtml+xml')
      headers["Content-Type"] = "application/xhtml+xml; charset=utf-8"
    else
      headers["Content-Type"] = "text/html; charset=utf-8"
    end
  end
7b758036ee8c370652514421b04d3f96?d=identicon&s=25 nick (Guest)
on 2007-01-01 19:15
Isak Hansen wrote:
> On 1/1/07, nick <rails-mailing-list@andreas-s.net> wrote:
>> Now is between xhtml 1.0 (served ad html...but in this case, which are
>> the benefits to use xhtml?)
>
> Use a before_filter in your application controller to set the headers
> correctly.
> Something like:
>
>   def set_encoding
>     if request.env["HTTP_ACCEPT"] &&
> request.env["HTTP_ACCEPT"].index('application/xhtml+xml')
>       headers["Content-Type"] = "application/xhtml+xml; charset=utf-8"
>     else
>       headers["Content-Type"] = "text/html; charset=utf-8"
>     end
>   end

thanks :)
I've also found this:
http://www.7nights.com/asterisk/test/test_trans.htm
http://www.7nights.com/asterisk/test/test_strict.htm
with IE is ok, but wit firefox there is a little problem, so i don't
know if use strict instead of transitional :(
This topic is locked and can not be replied to.