[uf-discuss] DOM scripting as an alternative to include-pattern?
brian.suda at gmail.com
Fri Jun 2 21:24:05 PDT 2006
On 6/2/06, Michael Leikam <leikam at yahoo.com> wrote:
> include-pattern rules strikes me as one very small DOM
> manipulation, so I'm wondering why we don't just adopt the whole thing?
> If I were parsing an hCard on the client side, ...
--- not all microformats are parsed on the client-side. X2V runs
server-side and client-side on the command line with programs like
manipulate the DOM is not an option in these instances.
> This approach would solve the "common organization name which exists outside my hCard" as well as the "Location data which exists outside my vevent" problems. It would expose text, descendant trees and tag attribute/value pairs (the last of which I think are opaque with the include-pattern approach).
--- The id-reference in the include pattern includes the whole
document fragement where the ID is located, this include all the
descendants of that ID as well.
> Here's a use case: I'm considering marking up a page like my Biology Schedule of Classes as hCalendar events.
> Inserting <object> tags for this purpose is a non-starter
> in part because I would need to include too many elements which are outside of an event row (e.g., term, course title, section group).
--- HTML already offers some lesser known semantics that we have
employed to help in situations like this. In an HTML table there
are several addition attributes such as AXIS, HEADER, and ID  all
of which microformats parsers can use, similarly to the
include-pattern, to include additional data from other parts of the
table. This doesn't solve 100% of the mark-up problems, but it gets
you alot closer without having you use <object>s
 - http://microformats.org/wiki/hcalendar-brainstorming#Tabular_event_calendars
 - http://www.w3.org/TR/html4/struct/tables.html#h-11.4.1
More information about the microformats-discuss