Subject: Re: [xsl] transforming lists From: ronald heller <ronald@xxxxxxxxxxx> Date: Wed, 24 Jul 2002 14:40:24 +0200 |
Cheers Ronald
The xml I used: <document> <pardef id="9" leftmargin="1.2500in" list="bullet"/> <pardef id="10" leftmargin="1.2500in" list="hyphen"/> <par def="9"> <run> <font size="11pt" name="serif"/>ITEM 1 liste</run> </par> <par> <run> <font size="11pt" name="serif"/>ITEM 2 liste</run> </par> <par> <run> <font size="11pt" name="serif"/>ITEM 3 liste</run> <run> <font size="11pt" style="bold" name="Arial" color="blue"/> <break/> </run> </par> <par def="10"> <run> <font size="11pt" name="serif"/>ITEM 1 liste</run> </par> <par> <run> <font size="11pt" name="serif"/>ITEM 2 liste</run> </par> <par> <run> <font size="11pt" name="serif"/>ITEM 3 liste</run> <run> <font size="11pt" style="bold" name="Arial" color="blue"/> <break/> </run> </par> </document>
<fo:region-after extent="1.5cm" /> </fo:simple-page-master> </fo:layout-master-set>
<fo:flow flow-name="xsl-region-body"> <xsl:apply-templates /> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template>
<xsl:template match="par[not(@def)]" mode="insert"> <xsl:param name="def"/> <xsl:call-template name="list-item"> <xsl:with-param name="def" select="$def"/> </xsl:call-template> </xsl:template>
<xsl:template match="par[not(@def)]"> </xsl:template>
<xsl:template name="list-item"> <xsl:param name="def"/> <fo:list-item> <fo:list-item-label end-indent="label-end()"> <fo:block> <fo:inline> <xsl:call-template name="label"> <xsl:with-param name="def" select="$def"/> </xsl:call-template> </fo:inline> </fo:block> </fo:list-item-label>
<fo:list-item-body start-indent="body-start()"> <fo:block><xsl:apply-templates select="run"/></fo:block> </fo:list-item-body> </fo:list-item> </xsl:template>
<xsl:template name="label"> <xsl:param name="def"/> <xsl:choose> <xsl:when test="/document/pardef[@id=$def]/@list='bullet'">*</xsl:when> <xsl:otherwise>-</xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] transforming lists, sascha | Thread | Re: [xsl] transforming lists, sascha |
Re: [xsl] transforming lists, sascha | Date | Re: [xsl] transforming lists, sascha |
Month |