[svn r1966] r2244@freebird: fabien | 2006-01-25 01:03:44 -0500
Ajout de la target validate.
<?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: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:stylesheet>
<!-- Keep this comment at the end of the file
Local variables:
mode: xml
sgml-omittag:nil
sgml-shorttag:nil
sgml-namecase-general:nil
sgml-general-insert-case:lower
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:nil
sgml-parent-document:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
outline-regexp:"<xsl:"
End:
-->