// Compile the style sheet.
styleSheet = (StyleSheet) baseStyleSheet;
} else if (baseStyleSheet instanceof CSSStyleSheet) {
CSSStyleSheet cssStyleSheet = (CSSStyleSheet) baseStyleSheet;
CSSParserMode parserMode = cssStyleSheet.getParserMode();
String css = cssStyleSheet.getCSS();
// Prefix sufficient blank lines and white space to the front of
// the CSS to ensure that any line and column numbers that the
// parser reports are correct relative to the source XML.
String url = cssStyleSheet.getSourceDocumentName();
int line = cssStyleSheet.getSourceLineNumber();
int column = cssStyleSheet.getSourceColumnNumber();
StringBuffer buffer = new StringBuffer(
css.length() + line + column);
for (int i = 1; i < line; i += 1) {
buffer.append('\n');