[uf-dev] [value-excerption-pattern] Resolve Depth of Parsing

Ben Ward lists at ben-ward.co.uk
Sat Jun 21 13:43:04 PDT 2008

Hi devs,

I'm back on the value-excerption-pattern issues list, and working on  
the open Depth of Parsing issue. I'll quote it here for your  
convenience, but it's live on the wiki here: <http://microformats.org/wiki/value-excerption-pattern-issues#Depth_of_Parsing 

> <div class="hentry vevent">
>     <h1 class="entry-title summary">Party on Sunday!</h1>
>     <div class="updated published">Tuesday <span  
> class="value">2008-06-17</span></div>
>     <p class="entry-content description">We're having a party on
>         <span class="dtstart">Sunday, at 7pm!
>             <span class="value">2008-06-22T19:00:00+0100</span>
>         </span>.
>         Please bring your friends!
>     </p>
> </div>

Where the parsing rules for value-excerption-pattern parse all  
descendants by default, that results in the follow hAtom structure:

>     ENTRY-TITLE=Party on Sunday!
>     UPDATED=2008-06-17
>     PUBLISHED=2008-06-17
>     ENTRY-CONTENT=2008-06-22T19:00:00+0100

Note, this is not a case of one microformat embedded within another —  
which alone could be resolved by including the ‘mfo’ pattern in this  
spec (assuming it were seen as a good idea, which would be debated in  
itself). Instead, I propose the following parsing behaviour. It would  
solve this issue, and would not introduce additional processing  
instructions to the class attribute for properties (or root nodes).


   * Specify that by default, parsers only parse *children* of the  
parent element and not all descendants
   * Ideally that would be it, Toby I expressed children-only is too  
restrictive, so also provision for individual properties to override  
the child-only default, and instead parse *all* descendants (where we  
do not feel a child will not contain other properties)

This would result in a parse-depth flag on all fields, with some  
getting overridden to parse all descendants, which can be well  
structured solution and documented. Property name dictionaries in  
parsers would have to include the depth flag with the affected  

I think this is a better solution than adding mfo and an equivalent  
property level processing flag — which is lot of publishing complexity  
— and I think it makes most sense to default to the more conservative  
model (children only) with overriding to a liberal descendants parse  
for properties where it is required.

Feedback on this behaviour would be greatly appreciated,



More information about the microformats-dev mailing list