diff options
-rw-r--r-- | templates/du2html.xsl | 15 | ||||
-rw-r--r-- | templates/reST.xsl | 5 |
2 files changed, 15 insertions, 5 deletions
diff --git a/templates/du2html.xsl b/templates/du2html.xsl index 0e40c2a..d98ce0e 100644 --- a/templates/du2html.xsl +++ b/templates/du2html.xsl @@ -15,6 +15,8 @@ doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" indent="yes"/> + <x:template match="system_message" /> + <x:template match="reference"> <x:element name="a"> <x:attribute name="href"> @@ -43,16 +45,21 @@ <html xml:lang="{$language}" lang="{$language}"> <head> <title><x:value-of select="title"/></title> - <style type="text/css"><![CDATA[ - div.literal-block { white-space: pre } - ]]></style> + <link rel="stylesheet" type="text/css" href="/thenautilus.css" /> + <x:for-each select="docinfo/field[field_name='css']/field_body/*/list_item|docinfo/field[field_name='css']/field_body/paragraph"> + <link rel="stylesheet" type="text/css" href="{normalize-space(.)}" /> + </x:for-each> + <x:for-each select="docinfo/field[field_name='inline-css']/field_body"> + <style type="text/css"> + <x:value-of select="." disable-output-escaping="yes" /> + </style> + </x:for-each> </head> <body> <div id="content"> <h1><x:apply-templates select="title/node()"/></h1> <x:apply-templates/> </div> - <x:copy-of select="wc:tagged()"/> <div id="tags"> <x:apply-templates select="wc:tagged()"/> </div> diff --git a/templates/reST.xsl b/templates/reST.xsl index 7db5de2..d216243 100644 --- a/templates/reST.xsl +++ b/templates/reST.xsl @@ -326,7 +326,10 @@ A similar field exists for specifying the valign value. This field is called ":table-cell-valign:". --> <xsl:template match="table"> - <table cellpadding="0" cellspacing="0"><xsl:apply-templates /></table> + <table> + <xsl:if test="@classes"><xsl:attribute name="class"><xsl:value-of select="@classes"/></xsl:attribute></xsl:if> + <xsl:apply-templates /> + </table> </xsl:template> <xsl:template match="thead"> |