Commit b26e7d12 authored by cliclac's avatar cliclac

Résolution de quelques problèmes de validation et d'affichage.

parent e4e99fd4
application/epub+zip
application/epub+zip
\ No newline at end of file
......@@ -5,9 +5,9 @@
xpath-default-namespace="http://www.utc.fr/ics/hdoc/xhtml"
xmlns="http://www.w3.org/1999/xhtml"
version="2.0">
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="/html" priority="10">
<xsl:for-each select="body/section">
<xsl:variable name="path">../../../retour/oebps/chapitres/chapitre<xsl:number level="multiple" count="section" format="1"/>.xhtml</xsl:variable>
......@@ -24,27 +24,27 @@
</xsl:result-document>
</xsl:for-each>
</xsl:template>
<xsl:template match="section" priority="3">
<xsl:element name="h{count(ancestor::section)+1}">
<xsl:value-of select="header/h1"/>
<xsl:apply-templates select="div|section"/>
</xsl:element>
<xsl:apply-templates select="div|section"/>
</xsl:template>
<!-- Identity transformation -->
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<!-- Namespace substitution for hdoc elements -->
</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>
</xsl:stylesheet>
\ No newline at end of file
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:dc="http://www.idpf.org/2007/opf"
xpath-default-namespace="http://www.utc.fr/ics/hdoc/xhtml"
exclude-result-prefixes="xs"
xmlns="http://www.idpf.org/2007/opf"
version="2.0">
<xsl:import href="content/metadata.xsl"/>
......@@ -13,7 +13,7 @@
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="html">
<package unique-identifier="BookID" version="3.0">
<package unique-identifier="BookID" version="2.0">
<xsl:call-template name="metadata"/>
<xsl:call-template name="manifest"/>
<xsl:call-template name="spine"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:dc="http://www.idpf.org/2007/opf"
xpath-default-namespace="http://www.utc.fr/ics/hdoc/xhtml"
exclude-result-prefixes="xs"
xmlns="http://www.idpf.org/2007/opf"
version="2.0">
<xsl:template name="manifest">
<manifest>
<item id="tDMncx" href="tableDesMatieres.ncx" media-type="application/x-dtbncx+xml" />
<item id="tDMncx" href="tableDesMatieres.ncx" media-type="application/x-dtbncx+xml"/>
<xsl:for-each select="body/section">
<item>
<xsl:attribute name="href">chapitres/chapitre<xsl:number level="multiple" count="section" format="1"/>.xhtml</xsl:attribute>
<xsl:attribute name="id">ch<xsl:number level="multiple" count="section" format="1"/></xsl:attribute>
<xsl:attribute name="id">ch_<xsl:number level="multiple" count="section" format="1"/></xsl:attribute>
<xsl:attribute name="media-type">application/xhtml+xml</xsl:attribute>
</item>
</xsl:for-each>
</manifest>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:dc="http://www.idpf.org/2007/opf"
xpath-default-namespace="http://www.utc.fr/ics/hdoc/xhtml"
exclude-result-prefixes="xs"
xmlns="http://www.idpf.org/2007/opf"
version="2.0">
<xsl:template name="metadata">
<metadata>
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title><xsl:value-of select="head/title"/></dc:title>
<dc:creator><xsl:value-of select="head/meta[@name='author']/@content"/></dc:creator>
<dc:language>fr</dc:language>
<dc:identifier id="BookID">V2.0</dc:identifier>
</metadata>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:dc="http://www.idpf.org/2007/opf"
xpath-default-namespace="http://www.utc.fr/ics/hdoc/xhtml"
exclude-result-prefixes="xs"
xmlns="http://www.idpf.org/2007/opf"
version="2.0">
<xsl:template name="spine">
<spine toc="tDMncx">
<xsl:for-each select="body/section">
<itemref>
<xsl:attribute name="idref">ch<xsl:number level="multiple" count="section" format="1"/></xsl:attribute>
<xsl:attribute name="idref">ch_<xsl:number level="multiple" count="section" format="1"/></xsl:attribute>
</itemref>
</xsl:for-each>
</spine>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
</xsl:stylesheet>
......@@ -13,7 +13,9 @@
<head>
<meta content="org-example-5059463624137734586" name="dtb:uid"/>
</head>
<docTitle>
<text><xsl:value-of select="head/title"/></text>
</docTitle>
<navMap>
<xsl:apply-templates/>
</navMap>
......
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