From: VILLAIN FRANCK (FRANCK.VILLAIN@launchers.eads.net)
Date: 22/08/2002 - 09:18
J'ai le code suivant :
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:import href="statementsAtts.xsl"/>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name
="myPage"
page-height ="21cm"
page-width ="29.7cm"
margin-top ="1cm"
margin-bottom ="1cm"
margin-left ="1cm"
margin-right ="1cm">
<fo:region-start extent="1cm"
margin-top="1cm"/>
<fo:region-after extent="1cm"/>
<fo:region-body margin-left="1cm"
margin-right="1cm" margin-bottom="1cm" margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-end extent="1cm"/>
</fo:simple-page-master>
<fo:page-sequence-master
master-name="mySequence">
<fo:repeatable-page-master-reference
master-name="myPage"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-name="mySequence">
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates
select="CARNET"/>
</fo:flow >
</fo:page-sequence >
</fo:root>
</xsl:template>
<xsl:template match="CARNET">
<fo:block font-size="12pt">
<xsl:apply-templates select="Contact"/>
</fo:block>
</xsl:template>
<xsl:template match="Contact">
<xsl:for-each select="*">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:template>
<xsl:template match="CARNET">
<xsl:call-template name="Tableau"/>
</xsl:template>
<xsl:template match="Contact">
<fo:table-row line-height="20pt" >
<fo:table-cell>
<fo:block><xsl:value-of
select="nom"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block ><xsl:value-of
select="prenom"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block ><xsl:value-of
select="./Adresse/numero"/><xsl:value-of select="./Adresse/rue"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block ><xsl:value-of
select="./Adresse/cp"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block ><xsl:value-of
select="./Adresse/ville"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block ><xsl:value-of
select="telPerso"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block ><xsl:value-of
select="telPro"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block ><xsl:value-of
select="www"/></fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>
<xsl:template name="Tableau">
<fo:table space-after.optimum="5pt"
border-collapse="separate" table-layout="fixed">
<fo:table-column column-width="3cm"/>
<fo:table-column column-width="3cm"/>
<fo:table-column column-width="3cm"/>
<fo:table-column column-width="3cm"/>
<fo:table-column column-width="3cm"/>
<fo:table-column column-width="3cm"/>
<fo:table-column column-width="3cm"/>
<fo:table-column column-width="3cm"/>
<fo:table-body background-color="red"
font-size="10pt" font-family="sans-serif">
<fo:table-row line-height="50pt" >
<fo:table-cell><fo:block>Nom</fo:block></fo:table-cell>
<fo:table-cell><fo:block>Prenom</fo:block></fo:table-cell>
<fo:table-cell><fo:block>Adresse</fo:block></fo:table-cell>
<fo:table-cell><fo:block>Code
Postal</fo:block></fo:table-cell>
<fo:table-cell><fo:block>Ville</fo:block></fo:table-cell>
<fo:table-cell><fo:block>Tel
Perso</fo:block></fo:table-cell>
<fo:table-cell><fo:block>Tel
Pro</fo:block></fo:table-cell>
<fo:table-cell><fo:block>Email</fo:block></fo:table-cell>
</fo:table-row>
<xsl:apply-templates select="Contact"/>
</fo:table-body>
</fo:table>
</xsl:template>
</xsl:stylesheet>
Avec la version de fop 0.20.1 pas de probleme, tout se passe bien mais rien
avec la version 0.20.4, il genere le pdf mais pas correctement.
J'ai lu que depuis la version 0.20.3 il faut changer master-name par
master-reference mais cela n'y change rien.
Donc, quelqu'un comprends-t-il se qui se passe?
Merci
Francki
PS : Ce code est celui qui marche avec la version 0.20.1.
Si vous voyez que mon code n'est pas trés bon , je suis ouvert aux
critiques.
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Archive générée par hypermail 2.1.3 le 28/06/2004 - 11:06 UTC
webmaster@xmlfr.org
|