/** * Appends parsed source to passed style sheet. This style sheet must be * IMPERATIVELY parsed by this factory to guarantee proper appending. Uses * no inline element * * @param source * Source, interpretation depends on {@code type} * @param type * Type of source provided * @param base * Base url * @param sheet * StyleSheet to be modified * @return Modified StyleSheet * @throws IOException * When problem with input stream occurs * @throws CSSException * When unrecoverable exception during parsing occurs * @throws IllegalArgumentException * When type of source is INLINE */ public StyleSheet append(Object source, NetworkProcessor network, String encoding, SourceType type, StyleSheet sheet, URL base) throws IOException, CSSException { if (type == SourceType.INLINE) throw new IllegalArgumentException( "Missing element for INLINE input"); return append(source, network, encoding, type, null, false, sheet, base); }
/** * Appends parsed source to passed style sheet. This style sheet must be * IMPERATIVELY parsed by this factory to guarantee proper appending. Uses * no inline element * * @param source * Source, interpretation depends on {@code type} * @param type * Type of source provided * @param base * Base url * @param sheet * StyleSheet to be modified * @return Modified StyleSheet * @throws IOException * When problem with input stream occurs * @throws CSSException * When unrecoverable exception during parsing occurs * @throws IllegalArgumentException * When type of source is INLINE */ public static StyleSheet append(Object source, String encoding, SourceType type, StyleSheet sheet, URL base) throws IOException, CSSException { if (type == SourceType.INLINE) throw new IllegalArgumentException( "Missing element for INLINE input"); return append(source, encoding, type, null, false, sheet, base); }
result = CSSParserFactory.append(extractElementText(elem), null, SourceType.EMBEDDED, result, base); log.debug("Matched embedded CSS style"); result = CSSParserFactory.append(uri, encoding, SourceType.URL, result, uri); log.debug("Matched linked CSS style"); result = CSSParserFactory.append( elem.getAttribute("style"), null, SourceType.INLINE, elem, true, result, base); result = CSSParserFactory.append( elem.getAttribute("XDefaultStyle"), null, SourceType.INLINE, elem, false, result, base);
result = pf.append(extractElementText(elem), network, null, SourceType.EMBEDDED, result, base); log.debug("Matched embedded CSS style"); result = pf.append(uri, network, encoding, SourceType.URL, result, uri); log.debug("Matched linked CSS style"); result = pf.append( elem.getAttribute("style"), network, null, SourceType.INLINE, result = pf.append( elem.getAttribute("XDefaultStyle"), network, null, SourceType.INLINE,