Subject: Re: [xsl] formatting text with nested features From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 24 Oct 2003 11:19:19 +0100 |
<xsl:for-each select="//p"> <fo:block font-family="Times-Roman" space-before="10pt"> <xsl:for-each select=".//text()"> You don't want to use .// here as that can easily result in pulling your document out of sequence. Just let xslt do the work for you. don't use for-each, just use <xsl:apply-templates/> then have <xsl:template match="p"> <fo:block font-family="Times-Roman" space-before="10pt"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="i"> <fo:inline font-style="oblique"> <xsl:apply-templates/> </fo:inline> </xsl:template> <xsl:template match="b"> <fo:inline font-weight="bold"> <xsl:apply-templates/> </fo:inline> </xsl:template> etc, and XSL will just automatically do the right thing with respect to nesting. David -- http://www.dcarlisle.demon.co.uk/matthew ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] formatting text with nested f, Kloeck, Erwin | Thread | Re: [xsl] formatting text with nest, M. David Peterson |
RE: [xsl] org.apache.xml.dtm.DTMExc, Michael Kay | Date | Re: [xsl] looping, moving through e, David Carlisle |
Month |