From: Tobias Reif Date: 2001-09-05T21:39:37+09:00 Subject: [ruby-talk:20921] Re: Minor cgi.rb question David Alan Black wrote: >>http://www.w3.org/TR/html4/appendix/changes.html#h-A.3.2 >> * Almost all attributes that specify the presentation of an HTML >>document (e.g., colors, alignment, fonts, graphics, etc.) have been >>deprecated in favor of style sheets. The list of attributes in the >>appendix indicates which attributes have been deprecated. >> >>http://www.w3.org/TR/html4/index/attributes.html >>Index of Attributes >>Legend: D = Deprecated, L = Loose DTD, F = Frameset DTD >> >>Use CSS. >> >>Ruby libraries should be up to date. >> > > For writing HTML, though, a tool like the CGI library (or the kind of > HTML writer we've been talking about) is just a convenience, because > it doesn't validate or even impose any mild constraints based on the > DTD (such as limiting choice of elements). You can always just print > whatever you want, which means that whether or not there's a specific > method to print doesn't really have any deep implications. Well an HTML lib doesn't have to validate to provide some nice API for generating well-formed (and potentially valid) XHTML + CSS. > So something like having an HTML 3.2 mode, as opposed to an HTML 4.01 > mode, or whatever, is mainly a matter of saving some typing. > Excluding the older modes would just inflict a mild punishment on > people who wanted to write HTML 3.2. (Maybe that's what you want :-) Not at all. I want a lib (be it included in any CGI lib or not), that provides XHTML classes, and thus a specialized XML serializer. I just think it would be great fun; and it would be great for Ruby's popularity to have some more comprehensive up-do-date libs that provide solutions for today's needs. Users of that lib are free to choose from the options, according to their needs, environment, and audience. > In case it's not clear, I'm not saying not to use stylesheets. > (That's "a whole 'nother" topic, as they say.) I'm just saying that > since the CGI library isn't a validating SGML/XML tool, the question > of what convenience methods it does or does not provide is separate > from the question of what Web authors should or should not be doing. I didn't talk about what Web authors should or should not be doing; absolutely not (with "use CSS" I meant implementers, about which we were talking; better: "implement CSS"). I just suggested for any HTML writing library to be up-to-date, and thus provide means to generate the current version of HTML. (If it also provides means to generate older versions of HTML, to cater older browsers; fine.) Tobi -- Tobias Reif http://www.pinkjuice.com/myDigitalProfile.xhtml go_to('www.ruby-lang.org').get(ruby).play.create.have_fun http://www.pinkjuice.com/ruby/