[uf-dev] include-pattern testing
Brian Suda
brian.suda at gmail.com
Sun Apr 30 11:59:37 PDT 2006
We would have to re-write abit of information on the include pattern
page along with an example.
The include pattern mentions that it 'replaces' the <object> element.
[Thus a microformat parser would treat the above as follows, with the
object include completely replaced by the subtree that it references:]
it would be better to say something like the children of the reference
object are appended as children of the include object.
The one reason (which i can't create a strong example for at the
moment) would the following:
<div id="ref">
<span class="fn">brian suda</span>
</div>
<div class="vcard">
<object data="#ref" class="include url" type="text/html"/>
</div>
if we were to out-right replace the object with the referenced code,
we'd loose the class="url". If we change the rule slightly to say
'children' then it would actually become something like:
<div class="vcard">
<object data="#ref" class="include url" type="text/html">
<span class="fn">brian suda</span>
</object>
</div>
This keeps things nested and a definite hierarchy of classes.
I would also say that the include 'appends' the data because this
would actually be valid HTML (and microformats)
<div id="ref">
<span class="family-name">suda</span>
</div>
<div class="vcard">
<span class="n">
<span class="given-name">brian</span>
<object data="#ref" class="include" type="text/html">
<span class="honorific-prefix">Mr.</span>
</object>
</span>
</div>
which, with 'append' would become:
<div class="vcard">
<span class="n">
<span class="given-name">brian</span>
<object data="#ref" class="include" type="text/html">
<span class="honorific-prefix">Mr.</span>
<span class="family-name">suda</span>
</object>
</span>
</div>
but with 'replace' we'd loose the class="honorific-prefix"
-brian
[1] - http://www.w3.org/TR/html4/struct/objects.html
--
brian suda
http://suda.co.uk
More information about the microformats-dev
mailing list