]> granicus.if.org Git - docbook-dsssl/commitdiff
Feature req #565822: support multiple html.stylesheets
authorNorman Walsh <ndw@nwalsh.com>
Sun, 9 Jun 2002 11:00:40 +0000 (11:00 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sun, 9 Jun 2002 11:00:40 +0000 (11:00 +0000)
xsl/html/docbook.xsl

index 4f8727851002bc3087a14a054dcca7e2f3d5fadd..dcfd5ba964c6551dad78a40281fb35d338f0eb9b 100644 (file)
     <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
   </title>
 
-  <xsl:if test="$html.stylesheet">
-    <link rel="stylesheet"
-          href="{$html.stylesheet}"
-          type="{$html.stylesheet.type}"/>
+  <xsl:if test="$html.stylesheet != ''">
+    <xsl:call-template name="output.html.stylesheets">
+      <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
+    </xsl:call-template>
   </xsl:if>
 
   <xsl:if test="$link.mailto.url != ''">
@@ -172,6 +172,34 @@ body { background-image: url('</xsl:text>
   <xsl:apply-templates select="." mode="head.keywords.content"/>
 </xsl:template>
 
+<xsl:template name="output.html.stylesheets">
+  <xsl:param name="stylesheets" select="''"/>
+
+  <xsl:choose>
+    <xsl:when test="contains($stylesheets, ' ')">
+      <link rel="stylesheet" href="{substring-before($stylesheets, ' ')}">
+        <xsl:if test="$html.stylesheet.type != ''">
+          <xsl:attribute name="type">
+            <xsl:value-of select="$html.stylesheet.type"/>
+          </xsl:attribute>
+        </xsl:if>
+      </link>
+      <xsl:call-template name="output.html.stylesheets">
+        <xsl:with-param name="stylesheets" select="substring-after($stylesheets, ' ')"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$stylesheets != ''">
+      <link rel="stylesheet" href="{$stylesheets}">
+        <xsl:if test="$html.stylesheet.type != ''">
+          <xsl:attribute name="type">
+            <xsl:value-of select="$html.stylesheet.type"/>
+          </xsl:attribute>
+        </xsl:if>
+      </link>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
 <!-- ============================================================ -->
 
 <xsl:template match="*" mode="head.keywords.content">