manifest.xsl 1007 Bytes
Newer Older
cliclac's avatar
cliclac committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?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"
    version="2.0">
    <xsl:template name="manifest">
        <manifest>
            <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="media-type">application/xhtml+xml</xsl:attribute>
                </item>
            </xsl:for-each>
        </manifest>
    </xsl:template>
    
</xsl:stylesheet>