microformat-shiv.js
function(rootNode, filters) {
            if(modules.utils.isString(filters)){
                filters = [filters];
            }
			var newRootNode = modules.domUtils.createNode('div'),
				items = this.findRootNodes(rootNode, true),
				i = 0,
				x = 0,
				y = 0;

            // add v1 names
            y = filters.length;
            while (y--) {
                if(this.getMapping(filters[y])){
                    var v1Name = this.getMapping(filters[y]).root;
                    filters.push(v1Name);
                }
            }

			if(items){
				i = items.length;
				while(x < i) {
					// append matching nodes into newRootNode
					y = filters.length;
					while (y--) {
						if(modules.domUtils.hasAttributeValue(items[x], 'class', filters[y])){
							var clone = modules.domUtils.clone(items[x]);
							modules.domUtils.appendChild(newRootNode, clone);
							break;
						}
					}
					x++;
				}
			}

			return newRootNode;
		}
function(rootNode, filters) {
            if(modules.utils.isString(filters)){
                filters = [filters];
            }
			var newRootNode = modules.domUtils.createNode('div'),
				items = this.findRootNodes(rootNode, true),
				i = 0,
				x = 0,
				y = 0;

            // add v1 names
            y = filters.length;
            while (y--) {
                if(this.getMapping(filters[y])){
                    var v1Name = this.getMapping(filters[y]).root;
                    filters.push(v1Name);
                }
            }

			if(items){
				i = items.length;
				while(x < i) {
					// append matching nodes into newRootNode
					y = filters.length;
					while (y--) {
						if(modules.domUtils.hasAttributeValue(items[x], 'class', filters[y])){
							var clone = modules.domUtils.clone(items[x]);
							modules.domUtils.appendChild(newRootNode, clone);
							break;
						}
					}
					x++;
				}
			}

			return newRootNode;
		}
function ( rootNode , filters ) { if ( modules . utils . isString ( filters ) ) { filters = [ filters ] ; } var newRootNode = modules . domUtils . createNode ( 'div' ) , items = this . findRootNodes ( rootNode , true ) , i = 0 , x = 0 , y = 0 ; // add v1 names y = filters . length ; while ( y -- ) { if ( this . getMapping ( filters [ y ] ) ) { var v1Name = this . getMapping ( filters [ y ] ) . root ; filters . push ( v1Name ) ; } } if ( items ) { i = items . length ; while ( x < i ) { // append matching nodes into newRootNode y = filters . length ; while ( y -- ) { if ( modules . domUtils . hasAttributeValue ( items [ x ] , 'class' , filters [ y ] ) ) { var clone = modules . domUtils . clone ( items [ x ] ) ; modules . domUtils . appendChild ( newRootNode , clone ) ; break ; } } x ++ ; } } return newRootNode ; }
find microformats of a given type and return node structures
find microformats of a given type and return node structures