[uf-discuss] Re: DOM scripting as an alternative to
include-pattern?
Michael Leikam
leikam at yahoo.com
Mon Jun 5 12:05:41 PDT 2006
Scott, Thanks for the link to microtemplates. That looks
useful and has given me an idea.
Tantek, I'll have to cook on your reply. Thanks for the
followup.
-ml
--- Scott Reynen <scott at randomchaos.com> wrote:
> On Jun 5, 2006, at 12:27 PM, Michael Leikam wrote:
>> > could you (or anybody else really)
> > explain a little more about the differences you see
> between
> > supporting DOM manipulation during the parsing, as I've
> > suggested, and supporting include-patterns?
>> The include pattern describes simple behavior (include
> the referenced
> fragment). DOM manipulation is one specific
> implementation of that
> behavior, and much more beyond it.
>> > What is the difference between defining a data
> > format and defining what people do with that data
> format
> > (i.e., what that data format is used for)?
>> I think the important difference is that the former makes
>> communication easier and the latter makes communication
> more difficult.
>> > But in order for the parser
> > to generate the target format, you've defined this
> > procedure:
> > ---------
> > if class is "include", grab the referenced node
> including
> > descendants and replace the current node with the
> > referenced one.
> > ---------
>> I think the HTML spec pretty much defines this procedure:
>> http://www.w3.org/TR/html4/struct/objects.html#adef-data
>> "This attribute may be used to specify the location of
> the object's
> data ... a serialized form of an object which can be used
> to recreate
> it."
>> Maybe this is a good example of why specs shouldn't be
> repeated.
>> > The sort of markup I had in mind was something like
> this:
> > ---------
> > <div id="company">
> > <div class="hcard">
> > <h1 class="fn org">Michael's Webby Widgets</h1>
> > <div class="adr">
> > <span class="locality">Los Angeles</span>
> > </div>
> > </div>
> > </div>
> > <div class="hcard" onUFparseEvent="add_org_and_city()">
> > <div class="fn">Michael Leikam</fn>
> > <a class="email" href="mailto:me at foo.bar">
> > </div>
> > ---------
>> This is invalid XHTML. There is no onUFparseEvent
> attribute for div
> tags. We can't just add arbitrary attributes to XHTML,
> and
> especially not if we expect anyone else to understand
> what we're
> trying to communicate.
>> > Adding an ID to span.locality, which I think
> > is how include-pattern wants to handle this, isn't
> > appealing because I'd want to use a generic hcard
> generator
> > for any contact information.
>> I don't think that's what the include pattern is for.
> You might want
> to look at microtemplates, as it seems to be more what
> you're after:
>> http://microtemplates.org/
>> > But from the replies I've
> > gotten, it sounds like this is the beginning of a
> > discussion and not something that is already ongoing.
>> The inclusion pattern is a relatively new introduction to
>> microformats. The object tag is older than microformats.
> The
> principle of separating markup from functionality is
> older than
> microformats.
>> Peace,
> Scott
>> _______________________________________________
> microformats-discuss mailing list
> microformats-discuss at microformats.org
>http://microformats.org/mailman/listinfo/microformats-discuss
>
More information about the microformats-discuss
mailing list