Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 28th, 2007, 02:42 PM
Authorized User
 
Join Date: Apr 2006
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default Page Breaks

Not sure if this topic got posted the fitst time. If it did, please igone it.
I need help in implementing page breaks in XML files? any suggestion on how can this be done? do you recommend using processing instructions or add a new elements would make more sense? can can the the processing instruction page number help in my case?

Any suggestions would help.

Thanks,
Bill

 
Old March 28th, 2007, 05:30 PM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

What do you mean by "Page Breaks"?


 
Old March 29th, 2007, 01:52 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

XML is basically a data mark up language, you might as well ask about adding a page-break to COM file.
If you have turned the data into a user friendly form, such as HTMl, then you can add page breaks.

--

Joe (Microsoft MVP - XML)
 
Old March 29th, 2007, 10:15 AM
Authorized User
 
Join Date: Apr 2006
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you please give me an idea about COM files, and how page-breaks can be added ot them.
To clarify things up, I know the content is displayed after being rendered to some XMLObjects tool. We mainly display digital content marked up in XML in our application after being rendered. The XML files are transformed from another XML file some which support page breaks.
The transformation part is easy, as long I find away to add support to page breaks to our application.
I have been think about couple of options, some of which:
1) have page breaks as a stylesheet that will modify the XML before being rendered to include some sort sort of page breaks element that will be supported in the XMLObjects. The problem I am running into, is I am not sure if an element is a good choice and what other options I can have, and how difficult will that to be implemented in the XMLObject.
2) I am not sure how to determine where a page break should go. are there examples or algorithms out there that might help.

and for bonekrusher, you can refer to this site to find out more information about page breaks http://www.webopedia.com/TERM/P/page_break.html

thanks,
bill


 
Old March 29th, 2007, 11:16 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Sorry I'm tottally confused, you can't add a page-break to a COM file, that was my point. If you could show the input XML and the desired output then perhaps that will clarify matters.

--

Joe (Microsoft MVP - XML)
 
Old March 29th, 2007, 11:26 AM
Authorized User
 
Join Date: Apr 2006
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry for confusion.
The desired output must be similar to the hard copy or the PDF file supplied for conversion. The whole point is make sure if the page breaks at an end of a page, to apply that to XML file as well. But I am not sure how.



 
Old March 29th, 2007, 12:12 PM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Well as I said XML files don't have the concept of page breaks. If you are converting the XML to HTML then use CSS page-break-after/before to add a break, if you are using xsl:fo then there are more fine grained properties. As I've no understanding of XMLObjects I can't help with that particular format.


--

Joe (Microsoft MVP - XML)
 
Old March 29th, 2007, 12:16 PM
Authorized User
 
Join Date: Apr 2006
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default

We are not converting to either PDF or HTML, but generating a file that is only viewed by our application.

 
Old March 29th, 2007, 12:28 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

>We are not converting to either PDF or HTML, but generating a file that is only viewed by our application.


Then you can generate a tag called <adspivyuvbwerivbyub> or anything else of your choice to indicate a page break, so long as your application knows what to do with it.

You seem to have missed the point of XML - you can use any tag you like to mean anything that you like, so long as the sender and recipient agree on the meaning.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old March 29th, 2007, 12:38 PM
Authorized User
 
Join Date: Apr 2006
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default

>Then you can generate a tag called <adspivyuvbwerivbyub> or anything >else of your choice to indicate a page break, so long as your >application knows what to do with it.

I agree with you. But I think it becomes more complex in implementation than just defining the tag. issue I got stuck at were: how to know where a page break is (unless you compare a page by page to the hard copy) and that's a time consuming costly operation.
I looked at how docbook handles page breaks, sounded interesting but not what I needed to do.
I am sure there are so many different way in implementing page breaks as an element, but I am trying to find the easiest way.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Page breaks in a table aspless Classic ASP Basics 4 January 18th, 2008 01:39 PM
Page-Breaks when printing saf ASP.NET 2.0 Basics 0 May 2nd, 2007 07:00 AM
Page breaks rupen HTML Code Clinic 1 October 4th, 2006 04:08 PM
Page Breaks in ASP askenkray SQL Server ASP 7 September 14th, 2006 02:03 AM
Page Breaks... PDF MER78 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 October 14th, 2004 07:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.