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