XSL - Dynamically enter blank lines in XHTML

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ems9tech
    New Member
    • Apr 2009
    • 12

    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:

    Code:
    	<xsl:variable name="newline">
    		<!-- 
    		<xsl:text>
    </xsl:text>		
    		<p>&nbsp;</p>
    		[url]http://www.danrigsby.com/blog/index.php/category/xslt/[/url]
    		*&nbsp;<br/>
    		<xsl:value-of select="'&#xA;'"/>
    		<xsl:text>&#xA;</xsl:text>
    		-->
    		<br/>*&nbsp;<br/>
    	</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 !!!!
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    is it for print or browser display?

    Comment

    • ems9tech
      New Member
      • Apr 2009
      • 12

      #3
      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!

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        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.

        Comment

        • ems9tech
          New Member
          • Apr 2009
          • 12

          #5
          Any ideas on how to get a blank line into the HTML so that my page # footer can be moved further down the page?

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            usually inserting breaks, though consider a div with a set height.

            Comment

            • ems9tech
              New Member
              • Apr 2009
              • 12

              #7
              Thanks. I'll look into giving a DIV a set height. Does anyone know how I can programmaticall y 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.

              Comment

              Working...