From: Bertrand Delacretaz (bdelacretaz@codeconsult.ch)
Date: 17/12/2002 - 17:54
laetitia iacona wrote:
>. . .
> Donc j'aimerai faire des listes sur le tag ExpressionDetail
Voila un exemple qui génère une structure fo:list-block. Je n'ai pas
vérifié avec FOP ou jfor mais c'est à peu près ça.
-Bertrand
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- XSL passtrough transform -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
>
<xsl:template match="/">
<exemple>
<xsl:apply-templates select="//Prec"/>
</exemple>
</xsl:template>
<xsl:template match="Prec">
<fo:list-block>
<xsl:apply-templates select=".//ExpressionDetail"/>
</fo:list-block>
</xsl:template>
<xsl:template match="ExpressionDetail">
<fo:list-item>
<fo:list-item-label><xsl:value-of select="position()"/></fo:list-item-label>
<fo:list-item-body>
<fo:block><xsl:value-of select="."/></fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:template>
</xsl:stylesheet>
--
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
|