/**
   * Add any project specified style sheets into the list of theme style sheets.
   *
   * @param context
   * @param runtimeProject
   */
  private void addProjectStyleSheets(XDIMEContextInternal context, RuntimeProject runtimeProject) {

    MarinerPageContext pageContext = getPageContext(context);

    // Find any theme style sheets which are specified in the project,
    // compile them and add them to the collection of compiled theme style
    // sheets.
    List projectThemeLocations = runtimeProject.getProjectThemesLocations();
    if (projectThemeLocations != null) {
      for (Iterator themeLocations = projectThemeLocations.iterator(); themeLocations.hasNext(); ) {
        String projectThemeLocation = (String) themeLocations.next();
        if (projectThemeLocation != null) {
          if (logger.isDebugEnabled()) {
            logger.debug("Project theme: " + projectThemeLocation);
          }
          CompiledStyleSheet projectStyleSheet =
              pageContext.retrieveThemeStyleSheet(projectThemeLocation);
          if (projectStyleSheet != null) {
            themeStyleSheets.addStyleSheet(projectStyleSheet);
          }
        }
      }
    }
  }
 /**
  * Add the provided compiled style sheet obtained from the <link> element to the collection of
  * theme style sheets. The mode must be XDIME2 if this function is called.
  *
  * @param compiledStyleSheet
  */
 public void addLinkStyleSheet(CompiledStyleSheet compiledStyleSheet) {
   themeStyleSheets.addStyleSheet(compiledStyleSheet);
 }