From: "Michael Haufe ("TNO")" on 30 Mar 2010 07:46 On Mar 30, 5:56 am, Hans-Georg Michna <hans- georgNoEmailPle...(a)michna.com> wrote: > On Mon, 29 Mar 2010 15:53:30 -0700 (PDT), Michael Haufe ("TNO") > wrote: > > >On Mar 29, 4:40 pm, Hans-Georg Michna <hans- > >georgNoEmailPle...(a)michna.com> wrote: > >> Assuming you want to group a couple of elements in an HTML page > >> for some purpose, let's say something to be done to them using > >> JavaScript. Assume these elements are otherwise unrelated and > >> cannot easily be found by other means, so you have to give them > >> some kind of marker to be able to find them easily. > > >> How would you do that? I would give them a class attribute and a > >> particular string in that attribute, and I still think this is > >> pretty much what class is meant for. > >Give them both an ID. > > Sure, that could be made to work. But since the IDs have to be > different, they don't really do what we want them to do---form a > group of elements. The JavaScript code to work on them would > have to contain a list of IDs for each grouping. That's ugly. You mentioned that they are unrelated, and I assume nowhere near each other in the document markup so I don't see how a class would be relevant. Perhaps a real world example is needed.
From: Hans-Georg Michna on 30 Mar 2010 11:00 On Tue, 30 Mar 2010 04:46:15 -0700 (PDT), Michael Haufe ("TNO") wrote: >You mentioned that [the grouped elements] are unrelated, and I >assume nowhere near each other in the document markup so I don't >see how a class would be relevant. Perhaps a real world example >is needed. Unfortunately my best example sits on an intranet and can't be reached. Under certain circumstances a number of HTML elements have to be modified dynamically through JavaScript code. I gave all these elements a certain class substring and find them by that. Hans-Georg
From: Scott Sauyet on 30 Mar 2010 13:43 Thomas 'PointedEars' Lahn wrote: > Garrett Smith wrote: >> Thomas 'PointedEars' Lahn wrote: >>> Garrett Smith wrote: >>>> Not only does HTML 4 explicitly allow class to be used for reasons >>>> other than CSS, it is actually used for such ulterior purposes. >>>> Microformats, for example, utilize class attribute in HTML. > >>> Microformats are not based on semantic markup; they are a design >>> mistake. > >> Can you elaborate how and why? > > Take this microformat example (courtesy of Wikipedia): > > [ ... all-div example ... ] > > To a HTML user agent, that is just a bunch of DIV elements with no meaning > attached. Now you might argue that the `class' attributes provide the > meaning, but the main purpose of the `class' attribute is to support > stylesheets (never trust the HTML 4.01 Specification when it starts talking > about "roles" and such), and the purpose of stylesheets is to *separate* > markup and presentation instead. > > This should have been at least > > [ ... somewhat more semantic example ... ] > > where I leave the SPAN elements for possible formatting, or even better > > [ ... more semantic XMLish example ... ] > > But you do not get the latter, very semantic markup in HTML. That seems to me the very point of microformats. It's not that authors should start with unsematic markup and add the microformat meta-data without thought to structure. I believe that the markup should be as semantically well-structured as the markup language will permit. But with HTML, that often is not very close to what you want. Microformats layer another structure on top of what you already have in a fairly innocuous manner. > However, > while you could do it with XHTML 1.1 (and an appropriate stylesheet), you > do not need to: The VCard should be generated for file download from the > same XML document (or JSON or whatever, as long as it has structure) that > the HTML code would; not vice-versa. I'm still waiting to hear *why*. You seem to be expanding on your contention that microformats are a design mistake but not really explaining why you think so. -- Scott
From: Eric Bednarz on 1 Apr 2010 20:07 "Michael Haufe (\"TNO\")" <tno(a)thenewobjective.com> writes: > On Mar 29, 2:28 am, Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >> People do all sorts of things, like disguising opinion as fact to >> support their polemic. Go figure. > > Do you have a point to make or not? Did you? You appeared to be merely paraphrasing (“People are using class names for things they weren't meant to be used for.”) what David already said (“Using class names for something other than intended indicates a bad design.”) Pardon my French, “weren't meant to be”, “other than intended”, either the bullshit detector should go berserk or the two of you should reveal your sources. > I don't see how mixing semantics with presentation is desirable as > mentioned in my previous post. So why do you introduce presentation to a discussion that isn't related to it? Same for semantics, I never noticed the lexical details of generalized markup having any. And I don't care at all about microformats, but since journo-blogging fantasy jargon (“semantic markup”) was used in this thread to bash them, they can't be that bad.
From: "Michael Haufe ("TNO")" on 1 Apr 2010 22:42
Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: > People do all sorts of things, like disguising opinion as fact to > support their polemic. Go figure. "Michael Haufe (\"TNO\")" <t...(a)thenewobjective.com> wrote: > Do you have a point to make or not? Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: > Did you? You appeared to be merely paraphrasing Then try reading again. Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: > (People are using class names for things they weren't meant to be > used for.) > > what David already said > > (Using class names for something other than intended indicates a > bad design.) Use proper attribution please. Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: > Pardon my French, werent meant to be, other than intended, either > the bullshit detector should go berserk or the two of you should reveal > your sources. You're telling me you need a W3C standard to understand the concept of the separation of concerns? "Michael Haufe (\"TNO\")" <t...(a)thenewobjective.com> wrote: > I don't see how mixing semantics with presentation is desirable as > mentioned in my previous post. Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: > So why do you introduce presentation to a discussion that isnt related > to it? The text of the thread begs to differ. Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: > Same for semantics, I never noticed the lexical details of > generalized markup having any. *You* never noticed, therefore it must be true. Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: > And I dont care at all about microformats, but since > journo-blogging fantasy jargon (semantic markup) was > used in this thread to bash them, they cant be that bad. Thomas Lahn was quite clear I think. |