Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save Page Breaks

Status
Not open for further replies.

Kirilla

Programmer
Jul 12, 2000
101
0
0
HU
Hi.

Could anyone help? I've import a Word Document as XML. All of the styles have benn imported except the page break.
If I have a document, which requires page break at the printing how can I do this? We have a manual in XML and all chapter must be start at new page, when we print this document.
Any ideas?

thanks, Kirilla
 
Kirilla,

Printing is a form of 'display'. XML does not deal with display, only data. You need to put your page breaking code in your display code, i.e., an XSL file.

Hope this helps
-pete
 
Hi palbano.

Thanks for reply. I know that, but I don't know the way to display or print this document exactly. As you know IE or any other browser doesn't support page breaks. What is that thing, which can display my XML for example as an Word document? What's the name that DTP software which can read my XML, XSL and DTD as I want and can make a PostScript or PDF or RTF or anything else which is usable in the printing house? (Is it possible, I have to create an application in Java which can interpret and print my document?)

regards, Kirilla
 
> As you know IE or any other browser doesn't support page breaks.

That's not entirly accurate. We use CSS page break attributes all the time to force printer page breaks from IE 5+ browsers.


<style type=&quot;text/css&quot;>
.mybreak{
page-break-after: always;
}
</style>

<p class=&quot;mybreak&quot;>&amp;nbsp</p>


-pete
 
Hi pete.

Thanks for your help. I've tried what you advised, but it didn't work. The source was the following:(XSL)

<?xml version='1.0' encoding=&quot;ISO-8859-2&quot; ?>
<xsl:stylesheet xmlns:xsl=&quot; <xsl:template match=&quot;/&quot;>
<HTML>
<style type=&quot;text/css&quot;>
.mybreak{
page-break-after: always;
}
</style>
<BODY>
<xsl:for-each select=&quot;valamik/valami&quot;>
<h3><xsl:value-of select=&quot;egy&quot;/></h3>
<xsl:element name=&quot;a&quot;>
<xsl:attribute name=&quot;href&quot;>
<xsl:value-of select=&quot;ketto&quot;/>
</xsl:attribute>
<xsl:value-of select=&quot;ketto&quot;/>
</xsl:element>
<p class=&quot;mybreak&quot;><xsl:value-of select=&quot;harom&quot;/></p>
</xsl:for-each>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>


Another problem is, an web page size depend on the resolution of the screen. It not usually has the same size like an A4 page. We would like to use XML ,'cause this way the translators can not damage the styles of paragraph.

Please help us.

Kirilla
 
Kirilla,

You are putting to much together to solve your problem. Get the CSS page breaks to work in a plain HTML page before you try to create them dynamically using XML/XSL transformations.

One hint is that we found that the CSS page breaks are ususally ignored when mismatched HTML tags are present.

&quot;But, that's just my opinion... I could be wrong&quot;.
-pete
 
Hi.

That's ok and thanks for your help. What do you suggest for the followings:
1. I have a well formed XML document and I'd like to make a printed book from it.
2. Which software is good enough for it?
(I've read a book by Neil Bradley - The XML-companion, which was made and printed from XML. I'd like the same)
As you know, browsers are not exactly developed to print documents but, however Word is not able to read XML.
I'd like to use the advantages of XML.

thanks for your reply and help, Kirilla
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top