Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML prints a blank page, please help!

Reply
Thread Tools

XML prints a blank page, please help!

 
 
Kragspire
Guest
Posts: n/a
 
      08-18-2004
I have some code that I would like to be able to print out a first
name on a new page of paper each time it runs. The problem I have is
when it reaches the end of the printing it produces a blank page. How
can I get rid of the blank page that prints out? Here is the source
code that I used to do this...

-------------------------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlnssl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
<title>Navy Claim Record</title>
<body>

<xsl:for-each select="Claims/Claim">
<div style="page-break-after:always">
<b>Contract Name: </b> <xsl:value-of select="ContractName"/><br/>
</div>

</xsl:for-each>

</body>
</html>
</xsl:template>

</xsl:stylesheet>
-------------------------------------------------------------------------------
Sorry about the format, it didn't seem to line up too well in this
message textbox.
 
Reply With Quote
 
 
 
 
Robin Johnson
Guest
Posts: n/a
 
      08-19-2004
On 18 Aug 2004 13:03:14 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (Kragspire) wrote:

> <xsl:for-each select="Claims/Claim">
> <div style="page-break-after:always">
> <b>Contract Name: </b> <xsl:value-of select="ContractName"/><br/>
></div>
>
></xsl:for-each>


It seems like bad behaviour on the part of whatever program is
printing your document, but you could try not forcing the page-break
on the last iteration:

<xsl:for-each select="Claims/Claim">
<div>
<xsl:if test="position() != last()">
<xsl:attribute name="style">
<xsl:text>page-break-after:always</xsl:text>
</xsl:attribute>
</xsl:if>
<b>Contract Name: </b>
<xsl:value-of select="ContractName"/>
<br/>
</div>
</xsl:for-each>
--
Robin Johnson
Lead Developer, enCircle Solutions Ltd.
first initial last name at encircle dot co dot uk
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Home Produced Prints Equal Lab Prints? Denis Boisclair Digital Photography 8 11-13-2004 03:20 PM
Durability of inkjet prints, photo prints Bill Tuthill Digital Photography 45 05-02-2004 03:04 AM
Just recieved my 15 free digital prints from Kellards- Amazing Quality Prints! Bruce Digital Photography 5 12-29-2003 02:49 AM
Why the prints from film feel more 3D then prints from digital. Victor81 Digital Photography 35 12-12-2003 07:49 AM
Epson 1280 prints NOT Waterproof, 2200 prints ARE, Right? Dr. Slick Digital Photography 12 11-29-2003 10:19 AM



Advertisments