﻿<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sm="http://schemas.microsoft.com/sdm/Windows/ServerManager/Configuration/2007/1"
xmlns:html="html"
version="1.0">
  <!-- Display the roles, role services, and features that are available for install.
  Default role services and subfeatures will be in bold. -->
  <xsl:output method="html"/>
  <xsl:template match="/">
    <xsl:apply-templates/>
  </xsl:template>
  <xsl:template match="sm:ServerManagerConfigurationQuery">
    <html:html>
      <body>
        <h2>Server Roles and Features</h2>
        <xsl:apply-templates/>
      </body>
    </html:html>
  </xsl:template>
  <xsl:template match="sm:Role">
    <xsl:if test="@Installed='true'">
      <B>
        <Font color="#00AA00">
          <xsl:value-of select="@DisplayName"/>
        </Font>
      </B>
    </xsl:if>
    <xsl:if test="@Installed='false'">
      <xsl:value-of select="@DisplayName"/>
    </xsl:if>
    <UL>
      <xsl:apply-templates/>
    </UL>
  </xsl:template>
  <xsl:template match="sm:RoleService">
    <xsl:if test="@Installed='true'">
      <B>
        <Font color="#00AA00">
          <xsl:value-of select="@DisplayName"/>
        </Font>
      </B>
    </xsl:if>
    <xsl:if test="@Installed='false'">
      <xsl:value-of select="@DisplayName"/>
    </xsl:if>
    <BR/>
    <UL>
      <xsl:apply-templates/>
    </UL>
  </xsl:template>
  <xsl:template match="sm:Feature">
    <xsl:if test="@Installed='true'">
      <B>
        <Font color="#00AA00">
          <xsl:value-of select="@DisplayName"/>
        </Font>
      </B>
    </xsl:if>
    <xsl:if test="@Installed='false'">
      <xsl:value-of select="@DisplayName"/>
    </xsl:if>
    <BR/>
    <UL>
      <xsl:apply-templates />
    </UL>
  </xsl:template>
</xsl:stylesheet>
