[microformats-discuss] Re: Parsing and class names

Brian Suda brian.suda at gmail.com
Sun Oct 16 08:04:44 PDT 2005


There are several examples of something like:
<a href="mailto:me at example.com" class="email fn">John Doe</a>

With XPath, you only have 'contains' which finds substrings. So what i
have to do is pad @class with a space at the front and rear, then
search for each class name with additional padded spaces. So to find
'email' i pad everything and search for ' email '.

If you dig through the examples both on the Wiki and in the wild, you
will see that there are plenty of examples that have two properties in
a single class. ORG and FN, FN and N, EMAIL and FN/N, etc. It is less
common in hCal because there is not alot of overlaping data, but it is
certainly possible and not too difficult to extract.

I hope that answers your question and helps.If you have any specific
examples i can certainly look into those.

-brian

On 10/16/05, Luke Arno <luke.arno at gmail.com> wrote:
> Brian,
>
> The atompub WG is kicking around the idea of using a microformat
> for introspection. Someone raised the following concern.
>
>   "I notice, for example, that none of the
>   microformat examples so far have multiple classes assigned, which while
>   being entirely valid xhtml might be forgotten and not properly handled by
>   specialised parsers."
>
> What has your experience been with X2V? Has this been a challenge?
>
> Others,
>
> Does anyone else have any comments on their experiences parsing
> microformats
>
> Your accounts will help the WG decide how to proceed.
>
> Thanks much.
>
> - Luke
>
>


--
brian suda
http://suda.co.uk


More information about the microformats-discuss mailing list