Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT 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 January 18th, 2013, 05:37 PM
Authorized User
Join Date: Apr 2010
Posts: 61
Thanks: 12
Thanked 0 Times in 0 Posts
Default Setting "margin-top" Attribute of <fo:region-body>


I'm using a stylesheet version 1.0.
I'm setting the attribute margin-top within the following:
      <xsl:when test="blah blah
        <xsl:attribute name=margin-top">
          <xsl:value-of select="blah blah"
The margin-top can contain from 3-10 (which is the number of lines that can be printed in the heading section of the PDF) and the <xsl:choose> has multiple combinations of tests. I now have to add an additional optional heading line which will increase the multiple combinations of tests resulting in an already clumsy method being more clumsy.

I was thinking of creating a template that added one to a separate variable for each of the tests above. Then I can set the final variable for the heading row count by adding these variables resulting in a value of between 3-11. I now want to set the margin-top attribute of the <fo:region-body> with this value.

I don't know if this is possible and where I would call the template.
I would like to set the margin-top within this new template but am not sure how to do this.

Any help will be greatly appreciated!


Similar Threads
Thread Thread Starter Forum Replies Last Post
"type" attribute in <script> tag Latinsteps BOOK: Beginning JavaScript 4th Edition 2 September 6th, 2011 01:29 AM
<%@ MasterType virtualPath="~/EAD_EditGrid.master"%> not recognised MattHoff BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 1 July 27th, 2010 10:21 AM
How to print "<megjegyzes></megjegyzes> " in my xml out put anarleti XSLT 5 April 23rd, 2010 10:58 AM
<deployment retail="true"> clarification jsymons BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 October 1st, 2009 02:48 PM
<authentication mode="Forms"/> msman88 ASP.NET 3.5 Professionals 10 August 30th, 2009 08:57 AM

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