Forum: Ruby on Rails DOCTYPE declaration:

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.
James B. Byrne (Guest)
on 2006-01-24 19:54
(Received via mailing list)
I am playing around with the Agile Rails development book again and
thought to see what effect, if any, placing a doctype declaration
at the top of an rhtml file would have.  When I insert any of the
three standard forms of such declaration at the top of
app/views/store.rhtml the product image disappears when the web
page is redisplayed.  The error logged in log/development.log is:


> ActionController::RoutingError (Recognition failed for
> "/images/product01"):
>     /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_control
>     ler/routing.rb:469:in `recognition_failed'


As I have very limited experience with css and xml and even less
with Ruby or Rails I would appreciate it very much if someone here
could explain to me what is happening.  The three forms that I have
tried are:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">

and

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN">

Regards,



--
     *** e-mail is not a secure channel ***
mailto:byrnejb.<token>@harte-lyne.ca
James B. Byrne                Harte & Lyne Limited
vox: +1 905 561 1241          9 Brockley Drive
fax: +1 905 561 0757          Hamilton, Ontario
<token> = hal                 Canada L8E 3C3
Bob S. (Guest)
on 2006-01-24 21:52
(Received via mailing list)
Without answering your question, I will point out that a valid doctype
must
have the namespace url for the browsers to apply it. That's been my
experience with IE at least. Unless you are coding strict xhtml, use the
xhtml transitional doctype.

For more on DOCTYPEs read A List Aparts Intro:

http://www.alistapart.com/stories/doctype/

HTH,

Bob S.
This topic is locked and can not be replied to.