[uf-discuss] Extension to include-pattern

Jason Karns karns.17 at osu.edu
Sat Jan 6 00:49:49 PST 2007


As per the include-pattern, I'd like the ability to reference a previously
defined object and include it in a subsequent hcard. In my case, I have the
organization marked up as an hcard and later in the document, I have
additional hcards for employees. As it stands now (or at least how I
understand it), the include object needs only the class 'include'. The
class(es) of the included tree are carried along and used for parsing. Would
it make sense to have any classes on the including object override a class
specified on included tree's root? For instance, my organization is marked
up as an hcard like so:

<span class="vcard">
	<span id="firm" class="fn org">3AM Productions</span> is a
	<span class="note">web design firm</span>
</span>
...
<span class="vcard">
	<a class="fn url" href="jason.php" title="see more about
Jason">Jason Karns</a>
</span>

And later in an employee's hcard, I would like to include the organization
from the previous hcard. However, due to the overloading of 'fn' and 'org',
if I were to simply include '#firm' into an employee's hcard (which already
has 'fn' defined), I would have a conflict with 'fn'.

<span class="vcard">
	<a class="fn url" href="jason.php" title="see more about
Jason">Jason Karns</a>
	<object data="#firm" class="include"></object>
</span>

Parsed vCard
============
FN: Jason Karns 3AM Productions ???????
URL: jason.php
ORG-NAME: 3AM Productions
NOTE: web design firm



My proposal would be to allow any extra hcard classes on the including
object override the class value on the included subtree. So following the
above example,

<span class="vcard">
	<span id="firm" class="fn org">3AM Productions</span> is a
	<span class="note">web design firm</span>
</span>
...
<span class="vcard">
	<a class="fn url" href="jason.php" title="see more about
Jason">Jason Karns</a>
	<object data="#firm" class="include organization-name"></object>
</span>

Notice the extra class on the object element. This class would then override
the classes specified on the included element ('firm'). Thus 'fn org'
becomes 'organization-name' and possible conflicts are avoided.

Parsed vCard
============
FN: Jason Karns
URL: jason.php
ORG-NAME: 3AM Productions
NOTE: web design firm



Any thoughts?

Jason Karns
~~~~~~~~~~~
The Ohio State University [www.osu.edu]
Computer Science & Engineering [www.cse.osu.edu]



More information about the microformats-discuss mailing list