Re: Microdata Issues [was Microdata design philosophies]

On Mon, Oct 19, 2009 at 8:10 PM, Martin McEvoy <martin@weborganics.co.uk> wrote:
> Tab Atkins Jr. wrote:
>> On Mon, Oct 19, 2009 at 7:13 AM, Martin McEvoy <martin@weborganics.co.uk>
>> wrote:
>>> You missed the point, How does my parser tell between attribute, is part
>>> of
>>> a vocabulary defined at "itemtype" and which atribute is part of a custom
>>> vocab made for just my use as useful script or css hooks?
>>>
>>> My parser cant of course,  my parser would have to be re-built or
>>> modified
>>> every time someone wants to define a new vocab.
>>
>> If it's a generic parser, it doesn't.  Generic parsers just grab all
>> the data regardless.  Generic parsers don't *act* on the data, though
>> - their only purpose is to scrape data which can then be fed to
>> specialized programs which *do* understand particular vocabularies and
>> can ignore pieces of data that don't exist in the vocab.
>>
>> If it's a vocab-specific parser (say, one that just looks for vcards)
>> then it knows what the vocabulary looks like, and can ignore incorrect
>> values up-front.
>
> Thats what I said?
>
> "My parser cant of course,  my parser would have to be re-built or modified
> every time someone wants to define a new vocab."
>
> thanks for taking the time to repeat that for me in depth ....

No, what you're saying and what I'm saying are different.  I'm saying
that you only have to modify your parser if you're wanting to add a
new, specific vocabulary to it.  You're implying that you'd have to
modify your parser *no matter what*, just because someone came up with
a new vocab somewhere.

What I said is, well, obvious.  Of course you have to modify your
program if you want it to act differently.  You are attempting to
imply, though, that it's impossible to write a generic parser.

>> I'm confused about your assertion about "attribute is part of a custom
>> vocab made for just my use as useful script or css hooks", though.
>> Microdata is *not* very useful as a script or CSS hook.
>
> I know it isn't,  what do you think Philip meant when he said this ...
>
> "the microdata DOM API is useful in that it allows scripts to read and
> modify the data of a document with a relatively simple syntax. Otherwise
> you'd have to write many helper functions or wrapper objects to hide the
> underlying DOM tree."
>
> sounds like he is talking about scripts reading and writing to the dom to
> me...I may be wrong though...

Philip was talking about something different.  The Microdata DOM API
does, as he said, make it relatively simple to read/modify the data in
the document.  This is meant as a comparison to *other* methods of
embedding metadata in HTML, such as RDFa or the class/rel/etc. based
embedding currently used by most Microformat vocabularies.  Both of
these are substantially more difficult for a script to read from a
document, or to modify in a document.

It is not meant to be compared to things such as @class and the data-*
attributes, which serve different purposes, and are generally more
appropriate as 'script hooks'.

>> Use classes,
>
> Indeed, but you know what authors are like if there is a convenient hook
> there already why not use it. less markup .. less time..etc ...etc
>
>> or if you must, data-* attributes.  Both of them are much easier for
>> scripts and CSS to work with.
>
> Indeed ...

I'm really not sure what you're trying to imply here.

>>> Microdata gets around all this by saying this....
>>>
>>> "An item can only have one type. The type gives the context for the
>>> properties."
>>> http://dev.w3.org/html5/spec/Overview.html#typed-items
>>>
>>> The above suggest that I can only define *one* vocab?  or does is? again
>>> not
>>> very clear.
>>>
>>
>> I'm not sure what you mean, or how you are assuming this.  A
>> particular item (that is, a blob of microdata contained in an HTML
>> element with the @itemscope attribute), can only have a single type.
>>
>
> Thats what I said ...
>
> "suggest that I can only define *one* vocab?"
>
> or maybe I used the wrong word  instead of the word "vocab" I should have
> used the word "itemtype" sorry for confusing you  ....

Again, I'm not sure what you're trying to say, then.  If you somehow
meant the same as what I said, then what's the problem?  Can you
articulate the issues you're having better?  I obviously didn't
understand them the first time around.

>>  The overall book review would be one @itemscope with a
>> particular @itemtype (the name of the book-review vocabulary), and it
>> would have an @itemprop which is also an @itemscope with an @itemtype
>> containing the name of the vcard vocabulary.
>>
>
> Phew you said the same thing three times there Tab  :)

I was trying to be explicit, so that there was no chance of
misunderstanding.  ^_^

>> Until you can demonstrate even a
>> cursory understanding of the microdata data model or the microdata
>> syntax, your contribution to any discussion around it is worth very
>> little.
>
> You are a funny man ;)
>
> If you cant answer my questions properly why bother answering in the first
> place? you are wasting my time and yours.
>
> Have you ever thought "Educate" instead of *insult*.

Indeed, and I am attempting to answer your questions as best as I can.
 Unfortunately most of what you've said before demonstrates either a
severe lack of understanding, or a very unfortunate language gap
between us.  The rest of what you've said has been unproductive
complaints.

If you still have problems with Microdata, can you restate them so
that perhaps I can understand you better?

~TJ

Received on Tuesday, 20 October 2009 02:28:16 UTC