This document tries to formalise different microformats algorithms.
Microformats are usually extracted from HTML. Follow the HTML spec to parse an HTML document into a DOM tree before applying any of these algorithms.
Note: this algorithm has skipped implementing special rules for date and time parsing from the original algorithm.
Note: there is a bug in this algorithm where null might be added to output. This carries from the original algorithm.
firstChild on walker.classList.contains on classes with the argument "value" is true, then:
textContent.tagName:
getAttribute on descendant with the argument "alt".
hasAttribute on descendant with the argument "value" is true, then set value to the return value of calling getAttribute on descendant with the argument "value".hasAttribute on descendant with the argument "title" is true, then set value to the return value of calling getAttribute on descendant with the argument "title".nextSibling on walker.length of classes is bigger than 0, then:
nextSibling on walker.nextNode on walker.nextNode on walker.