List Info

Thread: origin of class attribute approach in microformats ?




origin of class attribute approach in microformats ?
user name
2006-07-21 23:35:34
Hello,

I'm new to this list. Since I have heard about microformats
last year, I 
have always wanted to understand why the approach has
evolved to become 
the following "class attribute-approach":

<HTML>
    <body>
        <ul class="grocerylist">
            <li
class="fruit">Orange</li>
            <li
class="meat">Chicken</li>
            <li
class="vegetable">Corn</li>
        </ul>
    </body>
</HTML>

instead of the following mixed-namespace approach:

<HTML xmlns:ia="http://someindustryst
andard.org">
    <body>
        <ul>
            <ia:grocerylist>
           
<li><ia:fruit>Orange</ia:fruit></li>
           
<li><ia:meat>Chicken</ia:meat></li>
           
<li><ia:vegetable>Corn</ia:vegetable></
li>
            <ia:grocerylist>
        </ul>
    </body>
</HTML>

Both approaches work fine in a browser (firefox at least),
and both 
approaches could be generated from the same XML. But having
an XML 
background I see that the second approach has the following
advantages:

    * I can define my microformat in a formal XML schema
language (XSD,
      etc.) - Is there a way to describe formally
microformats?
    * I can generate code from that schema
    * I can filter out easily all the elements of a
namespace, validate
      it with my schema, and bind it to this code
    * I can overload elements with multiple tags (ex.
     
<ia:fruit><other:example>Orange</other:exampl
e></ia:fruit> and
      attributes <ia:fruit color="orange"
size="2">Orange</ia:fuit>
    * ... and in a nutshell, I can reuse a lot of the XML
technologies
      out there.

Can a microformat historian help me figure out why things
came to be the 
way they are (attribute class) not the other way
(mixed-namespace 
approach) ?

Thank you

Guillaume
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
origin of class attribute approach in microformats ?
user name
2006-07-22 02:15:14
Guillame,

Since you put it in the subject, regarding semantic class
names, see:

* http://www.w
3.org/QA/Tips/goodclassnames
* http://t
antek.com/log/2002/12.html#L20021216
* http://meyerweb.com/eric/thoughts/2004/07/18/comp
etent-classing
* http://ta
ntek.com/log/2004/07.html#d20t2359


Regarding your questions about "namespaces" I
should first note that the
whole "namespaces" question is enough of a waste
of time for the list that
it is actually off-topic.

Please read:  http://mic
roformats.org/wiki/mailing-lists


In short this has been discussed many times on the list
already, and I'll do
my best to summarize the conclusions:


The mixed namespace approach has already been tried by
*numerous* others
since 1998 and has failed on the Web.

http://blog.davidjanes.com/mtarchives/2005_10.html#0034
10

OTOH, XHTML + semantic class names has seen widespread
adoption among the
web authoring/design/IA/publishing community.  Microformats
is leveraging
the approach that is both working better and frankly
dominating in practice
on the Web.

http://microformats.org/blog/2006/01/0
9/tim-bray-on-creating-xml-dialects/


A bit longer:

1. Namespaces are actually a *huge* negative.  Search for:
 a. namespaces Tower of Babel
 b. namespaces syntactic vinegar

2. Namespaces are actually *not* well supported in
sufficient modern
browsers, nor even sufficiently with enough W3C technologies
or test suites
as compared to (X)HTML + semantic class names + CSS.

3. XML elements are limited to one "name" and
thus semantic, whereas the
class attribute is a space separated set of names and can
thus capture
multiple semantics, providing a much more flexible semantic
structure for
authors, and greatly aiding in following DRY.  Note that
your example had to
duplicate the "list" semantic with <ul>
and <ia:grocerylist>.

4. There are 1000s more web authors/developers that
write/understand (X)HTML
+ semantic class names + CSS as compared to the number of
folks that
write/understand either plain or namespaced XML.

5. It's the publishers that matter, not the programmers. 
Or to put it
another way, programmers can solve problems once and share
open source.
Publishers have to keep solving markup/publishing problems
for content and
design numerous times continuously, and have much less
chance of being able
to share their solutions.  That plus the fact that there are
1000s more web
designers than programmers plus simple economics means the
best solution is
to optimize for ease of publishing, and let iterative open
source solve the
programming problems.


Regarding the "advantages" you give:

1. XML Schema / XSD usage has not been shown to provide any
advantage with
practical publishing on the Web.
2. Code generation is the wrong pain point to optimize for.
3. You can easily filter out the elements/properties of a
microformat as
well, and there are numerous implementations documented on
the wiki which do
so.
4. Multiple tags are still multiple elements, not
overloading elements.
5. Most of those "XML" technologies are totally
irrelevant to people who
actually author/design/publish content.


Hey Brian, should these all be in the FAQ?

Thanks,

Tantek


On 7/21/06 4:35 PM, "Guillaume Lebleu"
<glbrixlogic.com> wrote:

> Hello,
> 
> I'm new to this list. Since I have heard about
microformats last year, I
> have always wanted to understand why the approach has
evolved to become
> the following "class attribute-approach":
> 
> <HTML>
>   <body>
>       <ul class="grocerylist">
>           <li
class="fruit">Orange</li>
>           <li
class="meat">Chicken</li>
>           <li
class="vegetable">Corn</li>
>       </ul>
>   </body>
> </HTML>
> 
> instead of the following mixed-namespace approach:
> 
> <HTML xmlns:ia="http://someindustryst
andard.org">
>   <body>
>       <ul>
>           <ia:grocerylist>
>          
<li><ia:fruit>Orange</ia:fruit></li>
>          
<li><ia:meat>Chicken</ia:meat></li>
>          
<li><ia:vegetable>Corn</ia:vegetable></
li>
>           <ia:grocerylist>
>       </ul>
>   </body>
> </HTML>
> 
> Both approaches work fine in a browser (firefox at
least), and both
> approaches could be generated from the same XML. But
having an XML
> background I see that the second approach has the
following advantages:
> 
>   * I can define my microformat in a formal XML schema
language (XSD,
>     etc.) - Is there a way to describe formally
microformats?
>   * I can generate code from that schema
>   * I can filter out easily all the elements of a
namespace, validate
>     it with my schema, and bind it to this code
>   * I can overload elements with multiple tags (ex.
>    
<ia:fruit><other:example>Orange</other:exampl
e></ia:fruit> and
>     attributes <ia:fruit color="orange"
size="2">Orange</ia:fuit>
>   * ... and in a nutshell, I can reuse a lot of the XML
technologies
>     out there.
> 
> Can a microformat historian help me figure out why
things came to be the
> way they are (attribute class) not the other way
(mixed-namespace
> approach) ?
> 
> Thank you
> 
> Guillaume
> _______________________________________________
> microformats-discuss mailing list
> microformats-discussmicroformats.org
> http://microformats.org/mailman/listinfo/microforma
ts-discuss

_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
origin of class attribute approach in microformats ?
user name
2006-07-22 08:26:51
I'll try and summarize it in a different way: as far as
I'm concerned,
part of the very appeal of microformats (and part of the
reason for
the "micro" prefix) is simplicity.

- As a spec writer, you don't have to come up with wholly
new XML or
XML+RDF dialects
- As an author, you don't have to learn about how to deal
with XML
namespaces and, generally, embedding other XML into XHTML
- Even more importantly, you don't have to deal with the
massive
amount of quirks wrt/ handling XML namespaces in browsers

All you have to do is learn to use a few more classes, which
virtually
every browser already supports anyway, due to their
extensive use in
CSS.

And *because* you're just using HTML/XHTML classes, you can
already
benefit from the way a browser treats them. You don't have
to reinvent
the wheel, so to speak. A namespaced implemented would
require you to
come up with styling for every single element, but using
(X)HTML
classes lets you take advantage of the existing styling of
(X)HTML
elements.

Hope that helps 
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
origin of class attribute approach in microformats ?
user name
2006-07-24 00:22:58
Guillaume,

Le 22 juil. 06 à 08:35, Guillaume Lebleu a écrit :
> why the approach has evolved to become the following
"class  
> attribute-approach":
[...]
> instead of the following mixed-namespace approach:
[...]
> Both approaches work fine in a browser (firefox at
least), and both  
> approaches could be generated from the same XML. But
having an XML  
> background I see that the second approach has the
following  
> advantages:

It depends on the Web community you are talking to and then
the type  
of applications and tools. In the paradigm of Web authors
and Web  
designers, the Web community has a better understanding of
class  
names because they are used to it.
In some other Web communities, it will be the opposite,
people will  
have a better grip on XML namespaces, and schemas.

So it's really a question of community of practices. The
more  
important is to find bridges when it's possible. The rest
turns  
always in religious debates, which are pointless.




-- 
Karl Dubost - http://www.w3.org/Peop
le/karl/
W3C Conformance Manager, QA Activity Lead
   QA Weblog - http://www.w3.org/QA/
      *** Be Strict To Be Cool ***


_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
origin of class attribute approach in microformats ?
user name
2006-07-24 01:26:57
Thank you Karl for this short, proselytism-free answer.

Guillaume



Karl Dubost wrote:

> Guillaume,
>
> Le 22 juil. 06 à 08:35, Guillaume Lebleu a écrit :
>
>> why the approach has evolved to become the
following "class  
>> attribute-approach":
>
> [...]
>
>> instead of the following mixed-namespace approach:
>
> [...]
>
>> Both approaches work fine in a browser (firefox at
least), and both  
>> approaches could be generated from the same XML.
But having an XML  
>> background I see that the second approach has the
following  advantages:
>
>
> It depends on the Web community you are talking to and
then the type  
> of applications and tools. In the paradigm of Web
authors and Web  
> designers, the Web community has a better understanding
of class  
> names because they are used to it.
> In some other Web communities, it will be the opposite,
people will  
> have a better grip on XML namespaces, and schemas.
>
> So it's really a question of community of practices.
The more  
> important is to find bridges when it's possible. The
rest turns  
> always in religious debates, which are pointless.
>
>
>
>
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
origin of class attribute approach in microformats ?
user name
2006-07-24 05:17:29
On 7/23/06 5:22 PM, "Karl Dubost" <karlw3.org> wrote:

> Guillaume,
> 
> Le 22 juil. 06 à 08:35, Guillaume Lebleu a écrit :
>> why the approach has evolved to become the
following "class
>> attribute-approach":
> [...]
>> instead of the following mixed-namespace approach:
> [...]
>> Both approaches work fine in a browser (firefox at
least), and both
>> approaches could be generated from the same XML.
But having an XML
>> background I see that the second approach has the
following
>> advantages:
> 
> It depends on the Web community you are talking to and
then the type
> of applications and tools. In the paradigm of Web
authors and Web
> designers, the Web community has a better understanding
of class
> names because they are used to it.

All of this is certainly true.


> In some other Web communities, it will be the opposite,
people will
> have a better grip on XML namespaces, and schemas.

With all due respect, there is very little intersection
between the people
that have a better understanding of XML namespaces and
schemas, and actual
use of that understanding to publish *content* with XML
namespaces and
schemas on *the Web*.  There's tons of usage with
proprietary APIs, and tons
behind the firewall with proprietary one-off custom apps,
but nearly none
(certainly in comparison to HTML publishing) in terms of
*content*
publishing on the public *Web*.

That's the difference in this community.

The focus on *content* on the *public* *Web*.


> So it's really a question of community of practices.
The more
> important is to find bridges when it's possible.

I actually disagree with this quite strongly.

In short "building bridges" is code for
neo-political-correctness that
socially appeals to many, but has nothing to do with science
and the
scientific method.


To put it another way: Why is it important to build bridges
to failures?

In science, when a theory fails and is discredited,
scientists don't talk
about "building bridges" between failed theories
and working theories.

Rather, the evolution of science *depends* on rigorously
refuting and
putting to rest bad ideas.  Not building bridges to them.


> The rest turns  
> always in religious debates, which are pointless.

Which is why they are off-topic in this forum.

We're here to get real and get things done.  Not argue
about theoretical
problems.

Thanks,

Tantek

_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss
[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )