Commit 38191260 authored by bperraud's avatar bperraud

Transformation of list bullets to euro dash

parent 6294391a
......@@ -63,19 +63,33 @@ h3 {counter-reset: h4}
h4 {counter-reset: h5}
h5 {counter-reset: h6}
h2:before {counter-increment: h2; content: counter(h2) ".\0000a0\0000a0"}
h3:before {counter-increment: h3; content: counter(h2) "." counter(h3) ".\0000a0\0000a0"}
h4:before {counter-increment: h4; content: counter(h2) "." counter(h3) "." counter(h4) ".\0000a0\0000a0"}
h5:before {counter-increment: h5; content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ".\0000a0\0000a0"}
h6:before {counter-increment: h6; content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ".\0000a0\0000a0"}
h2::before {counter-increment: h2; content: counter(h2) ".\0000a0\0000a0"}
h3::before {counter-increment: h3; content: counter(h2) "." counter(h3) ".\0000a0\0000a0"}
h4::before {counter-increment: h4; content: counter(h2) "." counter(h3) "." counter(h4) ".\0000a0\0000a0"}
h5::before {counter-increment: h5; content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ".\0000a0\0000a0"}
h6::before {counter-increment: h6; content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ".\0000a0\0000a0"}
/* Global lists styling */
ul > li > p, ol > li > p {
ul > li p, ol > li p {
text-indent: 0;
}
ul {
list-style-type: none;
}
ul > li {
position: relative;
}
ul > li::before {
position: absolute;
left: -5mm;
content: "\2013";
}
/* Title formatting */
......
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
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"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="html">
<html lang="fr">
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="head">
<head>
<xsl:apply-templates select="node()|@*"/>
<link>
<xsl:attribute name="rel">stylesheet</xsl:attribute>
<xsl:attribute name="type">text/css</xsl:attribute>
<xsl:attribute name="href">main.css</xsl:attribute>
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xpath-default-namespace="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml"
>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<!-- Ajout de l'attribut lang -->
<xsl:template match="html">
<html lang="fr">
<xsl:apply-templates/>
</html>
</xsl:template>
<!-- Ajout de la référence au CSS -->
<xsl:template match="head">
<head>
<xsl:apply-templates select="node()|@*"/>
<link>
<xsl:attribute name="rel">stylesheet</xsl:attribute>
<xsl:attribute name="type">text/css</xsl:attribute>
<xsl:attribute name="href">main.css</xsl:attribute>
<xsl:attribute name="media">print</xsl:attribute>
</link>
</head>
</xsl:template>
<xsl:template match="section">
<xsl:variable name="level" select="count(ancestor::section) + 2"/>
<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="h6">
<xsl:variable name="level" select="count(ancestor::section) + 2"/>
<xsl:element name="h{$level}">
<xsl:value-of select="."/>
</xsl:element>
</xsl:template>
</link>
</head>
</xsl:template>
<!-- "Aplatissement" des sections en div avec numérotation correcte des hn -->
<xsl:template match="section">
<xsl:variable name="level" select="count(ancestor::section) + 2"/>
<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="h6">
<xsl:variable name="level" select="count(ancestor::section) + 2"/>
<xsl:element name="h{$level}">
<xsl:value-of select="."/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<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">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="body">
<body>
<h1><xsl:value-of select="/html/head/title"/></h1>
<p class="authors"><xsl:value-of select="/html/head/meta[@name='author']/@content"/></p>
<xsl:apply-templates select="node()|@*"/>
</body>
</xsl:template>
<xsl:template match="footer[not(node())]"/>
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xpath-default-namespace="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<!-- Traitement du titre et des auteurs du document -->
<xsl:template match="body">
<body>
<h1><xsl:value-of select="/html/head/title"/></h1>
<p class="authors"><xsl:value-of select="/html/head/meta[@name='author']/@content"/></p>
<xsl:apply-templates select="node()|@*"/>
</body>
</xsl:template>
<!-- Cleaning des footers vides -->
<xsl:template match="footer[not(node())]"/>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xpath-default-namespace="http://www.utc.fr/ics/hdoc/xhtml"
xmlns="http://www.w3.org/1999/xhtml"
>
<xsl:output method="xml" indent="yes"/>
<!-- Identity transformation -->
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<!-- Namespace substitution for hdoc elements -->
<xsl:template match="*" priority="1">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:template>
<!-- Suppress processing-instructions -->
<xsl:template match="processing-instruction()" priority="1"/>
</xsl:stylesheet>
<xsl:stylesheet
version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xpath-default-namespace="http://www.utc.fr/ics/hdoc/xhtml"
xmlns="http://www.w3.org/1999/xhtml"
>
<xsl:output method="xml" indent="yes"/>
<!-- Identity transformation -->
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<!-- Namespace substitution for hdoc elements -->
<xsl:template match="*" priority="1">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:template>
<!-- Suppress processing-instructions -->
<xsl:template match="processing-instruction()" priority="1"/>
</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