CLASS and ROLE

Hi Jose,

On 4/18/07, José Manuel Cantera Fonseca <jmcf@tid.es> wrote:
>
> Steven, Ben and the rest who answer,
>
> Thanks for your responses!!!
>
>  From a theoretical standpoint your comments about the class attribute
> make sense, but looking more into the reality nowdays, it is true the
> fact that the class attribute is used by authors to convey presentation.
> That is the reality, the state of the practice, regardless of what HTML
> 4.01 says. And I think that it could be an issue having things like
>
> <p class="myclassUseInCSS foaf:person">
>
> why ? Because, two different people are going to be "touching" the same
> attribute. The graphic designer who provides the final look and feel of
> a page and the metadata provider who annotates a page. That's an issue.
> Even, the designer will think that some styles are missing in the CSS

Hi Jose,
So, first also I've placed the same issue and now I'm happy that
@class is used in the right way. As You write, class can be have some
values, and if the Designers will not know anything about semantics,
@class can simply have two values. Depending on team that You use for
web developing, metadata can be added by (X)HTML programmer/coder and
CSS class by Designer, or vice versa. In a good prespective XHTML
coder should know both Syle and Semantics but Desingers and Coder can
be work separately without interaction. Not only, on my personal tests
(I'm also a Designer) I recenlty used more @class values for semantics
(like dc with foaf and doap). I've tested it with RDFa and eRDF both
(same use of attribute). Well, also microformats uses @class with
semantic meaning.

> ... Summarizing, if an attribute can be multivalued, and that values
> have not the same meaning, as it is the case, it can be a nightmare.

Not a nightmare... this is scenario:

1. Designer draw page and code, so he writes class="header-text"
2. Coder apply semantics layer on page, he found class="header-text"
on <span> as a short description of a project. He adds
class="header-text doap:shortdesc" leaving the designer's code as he
wrote.
3. Second Coder thinks "Yea, this is also good for Dublin core" and
adds dc:description to have class="header-text doap:shortdesc
dc:description"

The question is that we are not be used to write multiple values on
@class. Remember Yesterday. Two or three ages ago (in Italy) Designers
was reluctant to use CSS and the Table-design was the rule. Acutally
the huge numbers of Designers knows CSS!

> Also imagine that my page is generated by a server side script and that
> for some reason the class attribute is generated dynamically, I have to
> take care in generating also the "semantic values of the class
> attribute", not only the presentation values. It's going to be a mess.

If You write class dynamically (for style) you'll use same
guide-principles for semantics :-)

> New attributes are needed !!!

Remember, first I think like You :-) after a discussion with Ben and a
few number of tests, now I'm according to use @class with dual
meaning: Style and Semantic.

Thanks and Best Regards,

Simone

> Best regards

Received on Wednesday, 18 April 2007 14:44:11 UTC