[uf-dev] Defining and Extending Value Excepting
Ben Ward
lists at ben-ward.co.uk
Thu May 22 03:22:03 PDT 2008
OK, pushing on a bit:
I've got one flaw with my own suggestion here, which is that using
class="value" is going to cause a bit of car-crash in hCard, due to
the two instances of machine-data identified in the tel property
(documented on the wiki page <http://microformats.org/wiki/machine-
data>). The type property works alongside the other specified use of
value, whilst it's possible for the value itself to need a hidden data
value. In combination with this new value-pattern, we could end up
with mark-up like:
<p class="tel">
<span class="type">
Mobile Phone
<span class="value" title="cell"></span>
</span>
<span class="value">
+1-555-FORMATS
<span class="value" title="+15553676177"></span>
</span>
</p>
That's… messy. Value of Value is especially unpleasant, parsing the
value of tel without parsing the value of type as the value of tel
strikes me as complex (although, with value-excerpting itself not
fully spec'd, maybe it could be made to work).
So I'm suggesting one quick alteration here, which is to use a
class=data rather than class=value, so as to avoid the example above.
I'm thinking this from a publisher point of view as much as anything;
I'd like to avoid that above scenario of nesting the same class for
different behaviours.
Once again, more feedback on the pattern from a parsing angle would be
great. I'd like to be confident that the pattern is robust and
parsable before presenting it to µf-discuss; I don't want to lose it
in a maelstrom :-)
Thanks,
Ben
On 17 May 2008, at 23:08, Toby A Inkster wrote:
> Although this sounds like a nice idea, I've previously been informed
> that requiring empty inline elements is a non-starter, as many HTML
> processors (including "tidy" with its default settings) strip these
> out.
>
> Preliminary testing with tidy (version: 1 September 2005) shows this
> to be true. Some parsers, including X2V IIRC, pre-process non-XHTML
> HTML by running it through tidy to get it into well-formed XML.
> Skimming through the tidy documentation, I can't see a way of
> disabling this empty inline element stripping behaviour.
>
> If people *want* to publish data that uses empty inline elements,
> then that's fair enough, but with the current state of HTML
> processors, it's probably unwise to publish a pattern that
> *requires* the use of empty inline elements.
>
> --
> Toby A Inkster
> <mailto:mail at tobyinkster.co.uk>
> <http://tobyinkster.co.uk>
>
>
>
> _______________________________________________
> microformats-dev mailing list
> microformats-dev at microformats.org
> http://microformats.org/mailman/listinfo/microformats-dev
More information about the microformats-dev
mailing list