print.xsl
author fabien
Sun, 17 Jun 2007 19:49:07 -0400
branchstyles
changeset 7 c169cc563fe2
parent 5 20b41b986ac6
child 13 a1ec4d6963d7
child 15 27a2a404231e
permissions -rw-r--r--
[svn r2261] r2472@freebird: fabien | 2007-06-17 19:31:51 -0400 Ajout de Solvision.

<?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:output method="xml"
      indent="yes"/>

<xsl:attribute-set name="verylarge-title-font">
  <xsl:attribute name="font-size">18pt</xsl:attribute>
  <xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="large-title-font">
  <xsl:attribute name="font-size">16pt</xsl:attribute>
  <xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="medium-title-font">
  <xsl:attribute name="font-size">14pt</xsl:attribute>
  <xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="small-title-font">
  <xsl:attribute name="font-size">12pt</xsl:attribute>
  <xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="default-font">
  <xsl:attribute name="font-size">10pt</xsl:attribute>
</xsl:attribute-set>

<xsl:template name="list-label">
  <xsl:param name="labeltext">
    <xsl:text>-</xsl:text>
  </xsl:param>
  <!-- <xsl:param name="labeltext">
    <xsl:text>&#8226;</xsl:text>
  </xsl:param> -->
  <list-item-label end-indent="label-end()">
    <block><xsl:value-of select="$labeltext"/></block>
  </list-item-label>
</xsl:template>

<!-- normal name processing -->
<!-- should be move in common.xsl -->
<xsl:template name="name">
  <xsl:apply-templates select="firstname"/>
  <xsl:if test="initials">
    <xsl:text> </xsl:text>
    <xsl:apply-templates select="initials"/>
  </xsl:if>
  <xsl:text> </xsl:text>
  <xsl:apply-templates select="surname"/>    
</xsl:template>

<xsl:template match="address">
  <xsl:apply-templates mode="address" select="street"/>
  <block>
    <xsl:value-of select="city"/>
    (<xsl:value-of select="state"/>),
    <xsl:value-of select="postcode"/>
  </block>
  <xsl:apply-templates select="country" mode="address"/>    
</xsl:template>
<xsl:template match="*" mode="address">
  <block><xsl:apply-templates/></block>
</xsl:template>

<xsl:template match="organism" mode="short">
  <xsl:apply-templates select="name"/>
</xsl:template>

<!-- para default processing -->
<xsl:template match="para">
  <block text-align="justify"><xsl:apply-templates/></block>
</xsl:template>

<!-- formalpara processing -->
<xsl:template match="formalpara/para">
  <xsl:apply-templates/>
</xsl:template>
<xsl:template match="formalpara/title">
  <inline font-weight="bold"><xsl:apply-templates/></inline>
</xsl:template>
<xsl:template match="formalpara">
  <block space-before="4pt"><xsl:apply-templates/></block>
</xsl:template>

<!-- list processing -->
<xsl:template match="list">
  <list-block space-before="24pt">
    <xsl:apply-templates/>
  </list-block>
</xsl:template>
<xsl:template match="formalpara/list">
  <list-block provisional-distance-between-starts="5mm">
    <xsl:apply-templates/>
  </list-block>
</xsl:template>
<xsl:template match="shortlist">
  <block margin-left="24pt"><xsl:apply-templates mode="short"/></block>
</xsl:template>
<xsl:template match="formalpara/shortlist">
  <block margin-left="24pt">- <xsl:apply-templates mode="short"/></block>
</xsl:template>

<xsl:template match="listitem">
  <list-item>
    <xsl:call-template name="list-label"/>
    <list-item-body start-indent="body-start()">
      <xsl:apply-templates/>
    </list-item-body>
  </list-item>
</xsl:template>

<xsl:template match="item">
  <list-item>
    <xsl:call-template name="list-label"/>
    <list-item-body start-indent="body-start()">
      <block><xsl:apply-templates/></block>
    </list-item-body>
  </list-item>
</xsl:template>

<!-- inline element -->
<xsl:template match="emphasis">
  <inline font-style="italic"><xsl:apply-templates/></inline>
</xsl:template>
<xsl:template match="term">
  <inline text-decoration="underline"><xsl:apply-templates/></inline>
</xsl:template>
<xsl:template match="foreign">
  <inline font-style="italic"><xsl:apply-templates/></inline>
</xsl:template>
<xsl:template match="replaceable">
  <inline font-style="italic">
    <xsl:text>[</xsl:text>
    <xsl:apply-templates/>
    <xsl:text>]</xsl:text>
  </inline>
</xsl:template>
<xsl:template match="literal">
  <inline font-style="Courier"><xsl:apply-templates/></inline>
</xsl:template>

<xsl:template match="subscript">
  <inline vertical-align="sub" font-size="60%"><xsl:apply-templates/></inline>
</xsl:template>

<xsl:template match="superscript">
  <inline vertical-align="super" font-size="60%"><xsl:apply-templates/></inline>
</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:
-->