[svn r2097] r2155@freebird: fabien | 2006-07-15 23:26:24 -0400
Mise en place de trois index pour les poèmes.
Modifications des feuilles de styles pour utiliser des xref seulement.
+ − <?xml version="1.0"?>
+ − <xsl:stylesheet version="1.1"
+ − xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ − xmlns:xt="http://www.jclark.com/xt"
+ − extension-element-prefixes="xt"
+ − xmlns="http://www.w3.org/1999/XSL/Format">
+ −
+ − <xsl:import href="common.xsl"/>
+ − <xsl:import href="print.xsl"/>
+ − <xsl:import href="masters_print.xsl"/>
+ −
+ − <xsl:output method="xml" indent="yes"/>
+ −
+ − <xsl:attribute-set name="standard-block">
+ − <xsl:attribute name="text-indent">10mm</xsl:attribute>
+ − <xsl:attribute name="space-before">10pt</xsl:attribute>
+ − <xsl:attribute name="space-before.conditionnaly">discard</xsl:attribute>
+ − <xsl:attribute name="text-align">justify</xsl:attribute>
+ − </xsl:attribute-set>
+ −
+ − <xsl:template name="static-content">
+ − <xsl:param name="title"/>
+ − <static-content flow-name="xsl-region-before">
+ − <block border-after-style="solid">
+ − <table width="100%" table-layout="fixed">
+ − <table-column column-width="proportional-column-width(1)"
+ − number-columns-repeated="2"/>
+ − <table-body>
+ − <table-row>
+ − <table-cell>
+ − <block text-align="start"><xsl:value-of select="$title"/></block>
+ − </table-cell>
+ − </table-row>
+ − </table-body>
+ − </table>
+ − </block>
+ − </static-content>
+ − <static-content flow-name="xsl-region-after">
+ − <block border-before-style="solid">
+ − <table width="100%" table-layout="fixed">
+ − <table-column column-width="proportional-column-width(1)"
+ − number-columns-repeated="2"/>
+ − <table-body>
+ − <table-row>
+ − <table-cell>
+ − <block text-align="end">
+ − <xsl:text>page </xsl:text>
+ − <page-number/>
+ − </block>
+ − </table-cell>
+ − </table-row>
+ − </table-body>
+ − </table>
+ − </block>
+ − </static-content>
+ − </xsl:template>
+ −
+ − <!-- book -->
+ − <xsl:template match="book">
+ − <root>
+ − <xsl:call-template name="master-set"/>
+ − <xsl:apply-templates select="section"/>
+ − </root>
+ − </xsl:template>
+ −
+ − <xsl:template match="/book/section">
+ − <page-sequence master-reference="book-sequence">
+ − <xsl:call-template name="static-content">
+ − <xsl:with-param name="title">
+ − <xsl:apply-templates select="title"/>
+ − </xsl:with-param>
+ − </xsl:call-template>
+ − <flow flow-name="xsl-region-body">
+ − <xsl:apply-templates select="*[name()!='poetry']"/>
+ − </flow>
+ − </page-sequence>
+ − <xsl:apply-templates select="poetry"/>
+ − </xsl:template>
+ −
+ − <xsl:template match="poetry">
+ − <page-sequence master-reference="book-sequence">
+ − <xsl:call-template name="static-content">
+ − <xsl:with-param name="title">
+ − <xsl:apply-templates select="docinfo/title"/>
+ − </xsl:with-param>
+ − </xsl:call-template>
+ − <flow flow-name="xsl-region-body">
+ − <xsl:apply-templates/>
+ − </flow>
+ − </page-sequence>
+ − </xsl:template>
+ −
+ − <xsl:template match="section/title">
+ − <block xsl:use-attribute-sets="verylarge-title-font">
+ − <xsl:attribute name="space-after">5pt</xsl:attribute>
+ − <xsl:attribute name="space-before">10pt</xsl:attribute>
+ − <xsl:apply-templates/>
+ − </block>
+ − </xsl:template>
+ −
+ − <xsl:template match="poem/title">
+ − <block xsl:use-attribute-sets="large-title-font">
+ − <xsl:attribute name="space-after">5pt</xsl:attribute>
+ − <xsl:attribute name="space-before">10pt</xsl:attribute>
+ − <xsl:apply-templates/>
+ − </block>
+ − </xsl:template>
+ −
+ − <xsl:template match="nda">
+ − <block border-top="solid" border-bottom="solid"
+ − font-size="75%" font-style="italic"
+ − padding-top="10pt" padding-bottom="10pt"
+ − space-before="1in" space-before.conditionnaly="discard"
+ − margin-left=".5in" margin-right=".5in">
+ − <xsl:apply-templates/>
+ − </block>
+ − </xsl:template>
+ −
+ − <xsl:template match="para">
+ − <block xsl:use-attribute-sets="standard-block">
+ − <xsl:apply-templates/>
+ − </block>
+ − </xsl:template>
+ −
+ − <!-- dialog template -->
+ − <xsl:template match="dialog">
+ − <block xsl:use-attribute-sets="standard-block" start-indent="1cm">
+ − <xsl:apply-templates/>
+ − </block>
+ − </xsl:template>
+ − <xsl:template match="cite">
+ − <block xsl:use-attribute-sets="standard-block" font-style="italic">
+ − <xsl:text>"</xsl:text>
+ − <xsl:apply-templates/>
+ − <xsl:text>"</xsl:text>
+ − </block>
+ − </xsl:template>
+ −
+ − <xsl:template match="citation">
+ − <block xsl:use-attribute-sets="standard-block" font-style="italic"
+ − font-size="75%" margin-left="4in">
+ − <xsl:apply-templates/>
+ − </block>
+ − </xsl:template>
+ −
+ − <xsl:template match="poem">
+ − <block xsl:use-attribute-sets="standard-block">
+ − <xsl:attribute name="id">
+ − <xsl:value-of select="../@id"/>
+ − </xsl:attribute>
+ − <xsl:apply-templates/>
+ − </block>
+ − </xsl:template>
+ −
+ − <xsl:template match="strophe">
+ − <block xsl:use-attribute-sets="standard-block">
+ − <xsl:apply-templates/>
+ − </block>
+ − </xsl:template>
+ −
+ − <xsl:template match="verse">
+ − <block><xsl:apply-templates/></block>
+ − </xsl:template>
+ −
+ − <xsl:template match="cue">
+ − <block xsl:use-attribute-sets="standard-block" text-indent="0pt">
+ − <xsl:apply-templates/>
+ − </block>
+ − </xsl:template>
+ − <xsl:template match="caracter">
+ − <inline font-weight="bold">
+ − <xsl:apply-templates/>
+ − </inline>
+ − <xsl:text>: </xsl:text>
+ − </xsl:template>
+ − <xsl:template match="cue/para">
+ − <xsl:apply-templates/>
+ − </xsl:template>
+ −
+ − <xsl:template match="poetry" mode="xref">
+ − <xsl:variable name="href">
+ − <xsl:call-template name="get-id"/>
+ − </xsl:variable>
+ − <basic-link internal-destination="{$href}">
+ − <xsl:value-of select="docinfo/title"/>
+ − (<page-number-citation ref-id="{$href}"/>)
+ − </basic-link>
+ − </xsl:template>
+ −
+ − <xsl:template match="xref">
+ − <xsl:variable name="linkend" select="@linkend"/>
+ − <xsl:apply-templates mode="xref" select="//*[@id=$linkend]"/>
+ − </xsl:template>
+ −
+ − </xsl:stylesheet>
+ −