[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Multiple elements condition
At 2007-08-27 08:21 -0700, you wrote:
It's not outputting anything. That's because you didn't make the changes I suggested. I tried changing it around (below), but all that gave me was the first occurance of a para inside a note. That's correct, because I suggested that you not use <xsl:value-of> but that you change it to be an <xsl:for-each>. <fo:block keep-together="always"> Above is something I missed the first time ... you probably want keep-together.within-column="always" because otherwise your lines will not wrap. This is a common mistake. <fo:block text-align="center" font="bold 11pt arial" space-before="3mm" >NOTE</fo:block> <fo:block padding-left="30pt" padding-right="30pt"> <xsl:choose> <xsl:when test="count(./para) > 1"> The "./" is unnecessary. <fo:character character="□"/>□ <xsl:value-of select="para"/> Above you are duplicating the bullet. -----Original Message----- From: G. Ken Holman [mailto:gkholman@xxxxxxxxxxxxxxxxxxxx] Sent: Monday, August 27, 2007 8:07 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Multiple elements condition ... <xsl:for-each select="para"> <fo:block start-indent="30pt" end-indent="30pt"> <xsl:text>□ </xsl:text> <xsl:apply-templates/> </fo:block> </xsl:for-each> ... <fo:block start-indent="30pt" end-indent="30pt"> <xsl:apply-templates/> </fo:block> Following my instructions, your stylesheet would look more like: <fo:block keep-together.within-column="always"> <fo:block text-align="center" font="bold 11pt arial" space-before="3mm" >NOTE</fo:block> <xsl:choose> <xsl:when test="count(para) > 1"> <xsl:for-each select="para"> <fo:block start-indent="30pt" end-indent="30pt"> <xsl:text>□ </xsl:text> <xsl:apply-templates/> </fo:block> </xsl:for-each> </xsl:when> <xsl:otherwise> <fo:block start-indent="30pt" end-indent="30pt"> <xsl:apply-templates/> </fo:block> </xsl:otherwise> </xsl:choose> </fo:block> I hope this helps, but this is what I suggested last time and you didn't follow it then. . . . . . . . . . . . . . Ken -- Upcoming public training: XSLT/XSL-FO Sep 10, UBL/code lists Oct 1 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Jul'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|