Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old April 30th, 2011, 03:22 AM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Hi,

Thanks for your time..

And below is the latest xslt:

<code>
<?xml version="1.0" encoding="ISO-8859-1"?>
<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="/candidates">


<fo:root>

<fo:layout-master-set>
<fo:simple-page-master master-name="my-page" page-width="8in" page-height="11.5in">
<fo:region-body margin-top="0.80in" margin-bottom="0.20in" margin-left="0.20in" margin-right="0.20in" />
</fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="my-page">

<fo:flow flow-name="xsl-region-body">
<fo:block>
<fo:table text-align="center" border-spacing="3pt">

<fo:table-column column-number="1" />
<fo:table-column column-number="2" />


<fo:table-header>
<fo:table-row>
<fo:table-cell number-columns-spanned="2">
</fo:table-cell>
</fo:table-row>
</fo:table-header>

<fo:table-body>


<xsl:apply-templates select="report-bO/candidate-ro-details"/>

</fo:table-body>

</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>


<xsl:template match="report-bO/candidate-ro-details">

<fo:table-row>

<fo:table-cell height="5cm" overflow="hidden" number-rows-spanned="2" number-columns-spanned="1">
<fo:block>
<fo:block text-align="left" margin-left="40pt" font-size="10pt" white-space-collapse="false" white-space-treatment="preserve"><xsl:value-of select="attendancenumber"/></fo:block>
<fo:block text-align="left" margin-left="40pt" font-size="10pt" white-space-collapse="false" white-space-treatment="preserve"><xsl:value-of select="roname"/></fo:block>
<fo:block text-align="left" margin-left="40pt" font-size="10pt" white-space-collapse="false" white-space-treatment="preserve"><xsl:value-of select="contactname"/></fo:block>
<fo:block text-align="left" margin-left="40pt" font-size="10pt" white-space-collapse="false" white-space-treatment="preserve"><xsl:value-of select="filecasenumber"/></fo:block>
<fo:block text-align="left" margin-left="40pt" font-size="10pt" ><xsl:value-of select="addressline1"/></fo:block>
<fo:block text-align="left" margin-left="40pt" font-size="10pt" ><xsl:value-of select="addressline2"/></fo:block>
<fo:block text-align="left" margin-left="40pt" font-size="10pt" ><xsl:value-of select="addressline3"/>
<xsl:choose>
<xsl:when test="(string-length(addressline4)&gt;0)">
, <xsl:value-of select="addressline4"/>
</xsl:when>
<xsl:otherwise>
<fo:leader/>
</xsl:otherwise>
</xsl:choose>

</fo:block>
<fo:block text-align="left" margin-left="40pt" font-size="10pt"><xsl:value-of select="addressline5"/>
<xsl:choose>
<xsl:when test="(string-length(addressline6)&gt;0)">
, <xsl:value-of select="addressline6"/>
</xsl:when>
<xsl:otherwise>
<fo:leader/>
</xsl:otherwise>
</xsl:choose>

</fo:block>

<fo:block text-align="left" font-size="20pt"><fo:leader/></fo:block>
</fo:block>
</fo:table-cell>


</fo:table-row>
</xsl:template>
</xsl:stylesheet>

</code>


If you need any more information, please let me know.

Regards
Vishal
Reply With Quote
  #12 (permalink)  
Old May 2nd, 2011, 08:42 AM
Friend of Wrox
Points: 1,676, Level: 16
Points: 1,676, Level: 16 Points: 1,676, Level: 16 Points: 1,676, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2006
Location: , , .
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

I am sorry but this is the same XSLT file you posted, which has a number of FO violations. Which processor are you using? I am testing with FOP 1.0 and get violation. When I get rid of the violations, a only get 5 per page.
Reply With Quote
  #13 (permalink)  
Old May 3rd, 2011, 04:17 AM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Hi ,

Thanks for the reply.

I am using the fop jar "fop-0.20.5".

After eliminating violations did you get 5x2 labels per page starting from 1st page?

Regards
Vishal
Reply With Quote
  #14 (permalink)  
Old May 3rd, 2011, 08:49 AM
Friend of Wrox
Points: 1,676, Level: 16
Points: 1,676, Level: 16 Points: 1,676, Level: 16 Points: 1,676, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2006
Location: , , .
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

No, I get 5 X 1. I am using FOP 1.0
Reply With Quote
  #15 (permalink)  
Old May 5th, 2011, 05:01 AM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Hi ,

Thanks for yor time.

But i am also able to get 5x1 labels per page without blank page , but when 5x2 lables are printing in that case I am getting the first page as blank.

Do i need to change the FOP version?

Please suggest me.

Regards
Vishal
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink in PDF not working (XML to PDF using XSL-FO stylesheet) sidh.000 XSLT 0 September 30th, 2010 12:53 PM
XSL Fo: Forcing page numbers ashishb2281 XSLT 0 August 1st, 2008 08:43 AM
how to assign fo:page-number to a xsl:variable or jyotsnag XSLT 0 March 14th, 2006 01:49 AM
xml + xsl:fo --> PDF Kabe Classic ASP XML 0 August 26th, 2004 06:17 AM
Every other page blank in PDF jmurdock BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 July 6th, 2004 12:44 PM



All times are GMT -4. The time now is 07:57 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.