u.p("yo! got here w/ " + elem);
    public Layout getLayout(Context c, Node elem ) {        // we have to do the inputs manually since they don't depend on        // the element name        if ( elem.getNodeType() == elem.ELEMENT_NODE ) {            if ( elem.getNodeName().equals( "input" ) ) {                Element el = (Element)elem;                String type = el.getAttribute( "type" );                if ( type == null ) {                    return new InputButton();                }                if ( type.equals( "button" ) ) {                    return new InputButton();                }                if ( type.equals( "checkbox" ) ) {                    return new InputCheckbox();                }                //if(type.equals("file")) { return new InputCheckbox(); }                if ( type.equals( "hidden" ) ) {                    return new NullLayout();                }                if ( type.equals( "image" ) ) {                    return new InputImage();                }                if ( type.equals( "password" ) ) {                    return new InputPassword();                }                if ( type.equals( "radio" ) ) {                    return new InputRadio();                }                if ( type.equals( "reset" ) ) {                    return new InputButton();                }                if ( type.equals( "submit" ) ) {                    return new InputButton();                }                if ( type.equals( "text" ) ) {                    return new InputText();                }            }        }        // check for floats        if(LayoutUtil.isFloated(c,elem)) {            //u.p("in layout factory, found a floated element. forcing display: block");            return getCustomLayout(c,elem,"block");        }        // do normal layout resolution next        Layout lyt = getCustomLayout(c, elem );        if ( lyt != null ) {            return lyt;        }        // skip whitespace only nodes        if ( elem.getNodeType() == elem.TEXT_NODE ) {            if ( elem.getNodeValue().trim().equals( "" ) ) {                return new NullLayout();            }        }        if ( elem.getNodeType() == elem.TEXT_NODE ) {            return new AnonymousBoxLayout();        }        if ( elem.getNodeType() == elem.COMMENT_NODE ) {            return new NullLayout();        }        XRLog.layout( Level.WARNING, "error! returning null! type = " + elem.getNodeType() );        XRLog.layout( Level.INFO, "error! returning null! type = " + elem.getNodeType() );        XRLog.layout( Level.INFO, "name = " + elem.getNodeName() );        XRLog.layout( Level.INFO, "node = " + elem );        XRLog.layout( Level.INFO, "attribute = " + elem.ATTRIBUTE_NODE );        XRLog.layout( Level.INFO, "cdata = " + elem.CDATA_SECTION_NODE );        XRLog.layout( Level.INFO, "coomment = " + elem.COMMENT_NODE );        XRLog.layout( Level.INFO, "frag = " + elem.DOCUMENT_FRAGMENT_NODE );        XRLog.layout( Level.INFO, "document = " + elem.DOCUMENT_NODE );        XRLog.layout( Level.INFO, "doctype = " + elem.DOCUMENT_TYPE_NODE );        XRLog.layout( Level.INFO, "element = " + elem.ELEMENT_NODE );        XRLog.layout( Level.INFO, "entity = " + elem.ENTITY_NODE );        XRLog.layout( Level.INFO, "entity ref = " + elem.ENTITY_REFERENCE_NODE );        XRLog.layout( Level.INFO, "notation = " + elem.NOTATION_NODE );        XRLog.layout( Level.INFO, "processing inst = " + elem.PROCESSING_INSTRUCTION_NODE );        XRLog.layout( Level.INFO, "text node = " + elem.TEXT_NODE );        return new InlineLayout();    }