471,604 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,604 software developers and data experts.

XSL - Dynamically enter blank lines in XHTML

I am creating a 5 page document HTML document with variable table sizes. I am hard coding page breaks after the <DIV> for each page. To assure that all of my page numbers at the bottom of each page is in approximately the same location, I have created a recursive template to enter a certain number of <BR/> elements before the page # footer. However, the <BR/> isn't doing the trick. I've searched high and low for the right character to enter and nothing has worked:

Expand|Select|Wrap|Line Numbers
  1.     <xsl:variable name="newline">
  2.         <!-- 
  3.         <xsl:text>
  4. </xsl:text>        
  5.         <p>&nbsp;</p>
  6.         http://www.danrigsby.com/blog/index.php/category/xslt/
  7.         *&nbsp;<br/>
  8.         <xsl:value-of select="'&#xA;'"/>
  9.         <xsl:text>&#xA;</xsl:text>
  10.         -->
  11.         <br/>*&nbsp;<br/>
  12.     </xsl:variable>    
Also, should I use line position to determine the number of blank lines I need instead of the number of rows in my variable tables?

Thanks for any and all help !!!!
Apr 20 '09 #1
6 4773
8,656 Expert Mod 8TB
is it for print or browser display?
Apr 20 '09 #2
Mainly print, though we will also be viewing inside a browser control in a .NET application. Eventually, we want to convert XHTML to PDF, but no time now to create an XSL-FO. Thanks!
Apr 20 '09 #3
8,656 Expert Mod 8TB
although XSL-FO would probably be the best for print… maybe you can experiment a bit with the print-formatting options in CSS.

other than that I could only imagine to giving divs the height you want for a quick trial.
Apr 20 '09 #4
Any ideas on how to get a blank line into the HTML so that my page # footer can be moved further down the page?
Apr 20 '09 #5
8,656 Expert Mod 8TB
usually inserting breaks, though consider a div with a set height.
Apr 20 '09 #6
Thanks. I'll look into giving a DIV a set height. Does anyone know how I can programmatically insert blank lines in a recursively called template? If I manually place the <BR/> into the XSL, they work in the resulting HTML file, but not in the xsl:template I have.
Apr 20 '09 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

13 posts views Thread by Jesse Engle | last post: by
3 posts views Thread by Greg Scharlemann | last post: by
1 post views Thread by XIAOLAOHU | last post: by

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.