W3C home > Mailing lists > Public > public-multilingualweb-lt@w3.org > April 2012

Re: Practical question: elements or attributes?

From: Felix Sasaki <fsasaki@w3.org>
Date: Tue, 17 Apr 2012 11:25:33 +0200
Message-ID: <CAL58czpm8N0rMg+4_vqvz+KpQ1yL8CBMWVfoeisnBt8dvCyCYw@mail.gmail.com>
To: Arle Lommel <arle.lommel@gmail.com>
Cc: Multilingual Web LT Public List <public-multilingualweb-lt@w3.org>
Hi Arle all (still on vacation, just lurking),

it doesn't look nice, but you can mimic elements with attributes. E.g.,
instead of

<myElem someAttr="">...</myElem>
have in HTML5
<span its-myElem its-someAttr="">


Am 17. April 2012 10:45 schrieb Arle Lommel <arle.lommel@gmail.com>:

> Hi all,
> I realize that we are still trying to nail down the required data
> categories and that implementation is still a bit down the road, but I
> wanted to ask a general question: Do we prefer that our data categories be
> declared as attributes or as elements? Some, like translate, are quite easy
> to have as attributes and really only make sense that way, but what about
> something complex like processTrigger? That would be very difficult to
> declare as an attribute (it would need to be a bundle of attributes) and it
> makes sense to me to declare it as an element.
> However, using elements would also be more disruptive to the target
> formats than would using attributes. For instance, in an HTML5+ITS
> combination the core structure of HTML5 could remain unaltered if we use
> attributes, but when we start adding elements, we are making more
> fundamental structural changes.
> This question came up because I thought it would be a useful exercise to
> create examples in HTML5 snippets of what these data categories would
> actually look like, but I found I did not always know the best way to
> approach them. (It is a useful exercise, however, because it can help
> identify issues that need to be resolved. For example, in creating an
> example for autoLanguageProcessingRule I realized that its primary usage is
> probably not as a rule but as a pragma-type construct, which suggests we
> need to change the name somehow.
> Any thoughts on general principles or how to decide? Yves, this sounds
> like something you would have an opinion on.
> -Arle

Felix Sasaki
DFKI / W3C Fellow
Received on Tuesday, 17 April 2012 09:26:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:31:43 UTC