Commit 75c39a3c authored by Raphaël's avatar Raphaël

Adding of main.css to flat_hdoc and leveling of titles+div

parent 3e3c0696
......@@ -2,8 +2,11 @@
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xpath-default-namespace="http://www.w3.org/1999/xhtml">
xpath-default-namespace="http://www.w3.org/1999/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1999/xhtml"
>
<xsl:output method="xml" indent="yes"/>
......@@ -13,5 +16,47 @@
</xsl:copy>
</xsl:template>
<xsl:template match="html">
<html>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="head">
<head>
<xsl:apply-templates select="node()|@*"/>
<link>
<xsl:attribute name="ref">stylesheet</xsl:attribute>
<xsl:attribute name="type">text/css</xsl:attribute>
<xsl:attribute name="href">css/main.css</xsl:attribute>
</link>
</head>
</xsl:template>
<xsl:template match="section">
<xsl:variable name="level" select="count(ancestor::section) + 1"/>
<div>
<xsl:element name="h{$level}">
<xsl:value-of select="header/h1"/>
</xsl:element>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="header">
</xsl:template>
<xsl:template match="div">
<xsl:variable name="level" select="count(ancestor::section) + 1"/>
<div>
<xsl:element name="h{$level}">
<xsl:value-of select="h6"/>
</xsl:element>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="h6">
</xsl:template>
</xsl:stylesheet>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment