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
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 Silva -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of James B. Byrne Sent: Tuesday, January 24, 2006 9:51 AM To: rails@lists.rubyonrails.org Subject: [Rails] DOCTYPE declaration: 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 _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Tue, 24 Jan 2006 11:51:38 -0800, "Bob Silva" <me@bobsilva.com> wrote:> For more on DOCTYPEs read A List Aparts Intro: > > http://www.alistapart.com/stories/doctype/That was quite helpful. I thereby discovered that my problem is not with the doctype and DTD url employed per se, but with an unexpected change in browser behaviour relating to absent image files in consequence of having a valid DOCTYPE statement present, at least in Firefox 1.5. In Firefox 1.5. when a doctype statement is absent then a missing image is represented by a default place-holder graphic. When a doctype specified then the place-holder is missing but a mouse hover over that area reveals the presence of the space reserved beneath and the url properties of the missing image. MS-IE displays the place-holder graphic in either case. Interesting. Many thanks for your help. 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