473,657 Members | 2,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML prints a blank page, please help!

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:styleshe et version="1.0"
xmlns:xsl="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="Contrac tName"/><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.
Jul 20 '05 #1
1 1889
On 18 Aug 2004 13:03:14 -0700, pn****@yahoo.co m (Kragspire) wrote:
<xsl:for-each select="Claims/Claim">
<div style="page-break-after:always">
<b>Contract Name: </b> <xsl:value-of select="Contrac tName"/><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:attribut e name="style">
<xsl:text>pag e-break-after:always</xsl:text>
</xsl:attribute>
</xsl:if>
<b>Contract Name: </b>
<xsl:value-of select="Contrac tName"/>
<br/>
</div>
</xsl:for-each>
--
Robin Johnson
Lead Developer, enCircle Solutions Ltd.
first initial last name at encircle dot co dot uk
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2227
by: Amir | last post by:
I really hope someone can explain this behavior. I have spend quite a bit of time and tried a bunch of things, so far nothing has worked. I have a page on which I have a datagrid with template columns. I perform regular expression validations in the EditItemTemplate for the fields that require such validation. The datagrid is inside a div tag to make it scrollable. I have implemented the solution to freeze header for this grid - the...
2
2103
by: eBob.com | last post by:
I have a print application modeled on a program which I found via this newsgroup. (I still have comments in German in it!) The model uses ExtendedPrintPreviewDialog but I don't seem to have that so I am using PrintPreviewDialog. It prints fine. But the PrintPreview dialog shows only one blank page. Before I resort to posting code, is there some simple and/or common mistake I could have made which would explain why PrintPreview shows...
0
1184
by: GiftX | last post by:
Hellow everyone, I am calling/manipulating Excel spreadsheet through VB 6.0. Most of my objectives are accomplished except some cosmetics. Problem#1: For example, after running my program to process a single record, when I proceed to print it, it prints the first page containing the processed record. It also prints 5 more blank pages without any record. Problem#2: Also, my intention is to print an Underline after writing each record,...
0
1235
by: timeline | last post by:
VB-WEB: proint Job Name is about:blank followed by content to print C#-APP: Sending a Job to the Printer with Crystal Reports I am using mshtml.HTMLDocumentClass docObject=new mshtml.HTMLDocumentClass(); mshtml.IHTMLDocument2 doc2 =docObject; mshtml.IHTMLDocument4 doc4=docObject; doc2..writeln("<html></html>"); doc2.close();
0
8315
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8608
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6172
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5633
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4164
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.