nl_tokens: parses a microdata item out of an itemscope DOM node
pl_tokens: function parseItem ( node , currentItem ) { // REMARK: note the raw dom node instead of $node to guarantee uniqueness if ( currentItem && currentItem . hasMemoryOf ( node ) ) { return Item . ERROR ; } var $node = $ ( node ) ; var type = splitUnique ( $node . attr ( 'itemtype' ) ) ; type = type && type . filter ( isAbsoluteUrl ) ; var item = new Item ( { type : type , id : $node . attr ( 'itemid' ) , node : node , parent : currentItem } ) ; walkNodes ( $node . children ( ) , <mask> ) ; // visit all nodes referenced by the current one var refs = splitUnique ( $node . attr ( 'itemref' ) ) ; if ( refs ) { var refsSelector = refs . map ( function makeIdSelector ( id ) { return '#' + id ; } ) . join ( ',' ) ; walkNodes ( $ ( refsSelector ) , item ) ; } return item ; }