protected String addStyleSheet(StringBuffer cda) throws SiteException {
// This points to the CDA XSL style sheet served from the root resources dir
String stylelink = "<?xml-stylesheet type='text/xsl' href='xsl/WebViewLayout_CDA.xsl'?>";
if (cda.length() < 1 || cda.indexOf(">") < 0) {
// CDA doesn't look like XML, raise
throw new SiteException("Invalid document", null);
}
// Insert the style sheet element immediately following the xml header
int endOfHeader = cda.indexOf(">");
int i = cda.indexOf("<?xml-stylesheet", endOfHeader);
if (i < 0) {