MediaList media = cssir.getMedia();
MediaList mediaList = cssir.getMedia(); String media = mediaList.getMediaText(); if (media.equals("")) media = sheetInfo.getMedia();
    private void pullRulesets(org.w3c.dom.css.CSSStyleSheet cssSheet, Stylesheet stylesheet) {        org.w3c.dom.css.CSSRuleList rl = cssSheet.getCssRules();        int nr = rl.getLength();        for (int i = 0; i < nr; i++) {            if (rl.item(i).getType() == org.w3c.dom.css.CSSRule.IMPORT_RULE) {                //note: the steadystate parser does not fetch and load imported stylesheets                CSSImportRule cssir = (CSSImportRule) rl.item(i);                String href = cssir.getHref();                MediaList media = cssir.getMedia();                String uri = null;                try {                    uri = new java.net.URL(new URL(stylesheet.getURI()), href).toString();                    StylesheetInfo info = new StylesheetInfo();                    info.setOrigin(stylesheet.getOrigin());                    info.setUri(uri);                    info.setMedia(media.getMediaText());                    info.setType("text/css");                    stylesheet.addStylesheet(info);                } catch (java.net.MalformedURLException e) {                    XRLog.exception("bad URL for imported stylesheet", e);                }            } else if (rl.item(i).getType() == org.w3c.dom.css.CSSRule.STYLE_RULE) {                stylesheet.addRuleset(new Ruleset((org.w3c.dom.css.CSSStyleRule) rl.item(i), stylesheet.getOrigin()));            }        }    }