microformats2 parsing

(Difference between revisions)

Jump to: navigation, search
(parsing a u- property: clarify e.g. in HTML, use page and base elements for resolving relative URLs)
(Added an issue to parsing rules)
Line 83: Line 83:
See the FAQ:
See the FAQ:
* [[microformats2-parsing-faq]]
* [[microformats2-parsing-faq]]
 +
 +
== issues ==
 +
<div class="discussion">
 +
* The parsing rule 'else if br.p-x or hr.p-x, then return "" (empty string)' for p-* can cause any code consuming the API to become quite bloated. It means that you have test every array value to see if its an empty string. It is also unclear to me what the purpose of this mark-up pattern is for  [[User:GlennJones|Glenn Jones]]
 +
</div>
 +
== see also ==
== see also ==

Revision as of 11:04, 9 February 2013


One of the goals of microformats2 is to greatly simplify parsing of microformats, in particular, by making parsing independent of any one vocabulary. This page briefly documents the microformats2 parsing algorithm for doing so.

Contents

parsing algorithm

parse a document for microformats

To parse a document for microformats:

parse an element for microformats

To parse an element for microformats:

parsing a p- property

To parse an element for a p-x property value:

parsing a u- property

To parse an element for a u-x property value:

parsing a dt- property

To parse an element for a dt-x property value:

parsing an e- property

To parse an element for a e-x property value:

parsing for implied properties

To imply properties: (where h-x is the root microformat element being parsed)

what do the CSS selector expressions mean

Use SelectORacle to expand any of the above CSS selector expressions into longform English prose.

questions

See the FAQ:

issues

  • The parsing rule 'else if br.p-x or hr.p-x, then return "" (empty string)' for p-* can cause any code consuming the API to become quite bloated. It means that you have test every array value to see if its an empty string. It is also unclear to me what the purpose of this mark-up pattern is for Glenn Jones


see also

microformats2 parsing was last modified: Wednesday, December 31st, 1969

Views