Subject: RE: [xsl] XSL - suppression of page header for first page of report From: "David Dunkenberger" <dgdunk@xxxxxxxxx> Date: Thu, 9 Sep 2010 08:08:08 -0400 |
I am using the XSL Report Designer from Antenna House to generate the XSL. The corresponding XSL is being run on an AIX machine so XSL-FO. By default the XSL that is generated by the Antenna House software causes the page header to be printed on every page, hence the issue. My apologies re; the expression: currentPage() - that is just commented section in the xsl section. It looks like the actual call is <fo:page-number/>. Thanks for the reply. David -----Original Message----- From: G. Ken Holman [mailto:gkholman@xxxxxxxxxxxxxxxxxxxx] Sent: Wednesday, September 08, 2010 9:43 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] XSL - suppression of page header for first page of report At 2010-09-08 21:31 -0400, David Dunkenberger wrote: >I am using an expression to display the current page number in the page >footer. >[expression : currentPage()] I'm not sure which language you are using with that function call, but you are in a situation where you need to test some condition of the *interpretation* of your result while you are in the transformation of the data that is producing your result. It can't be done that way ... XSLT is at arm's length from the system that is interpreting the result of your XSLT. >I need to have some information print in the page header, but I don't want >it to show on the first page, just every subsequent page. When using XSL-FO, this is accomplished with a page-sequence-master that sequences a page header without a page number on the first page of the page sequence, followed by a page header with a page number on every other page of the page sequence. Then the transformation is declarative and blissfully unaware of the interpretation of its result: it simply sequences the page headers as desired and lets the XSL-FO processor worry about rendering one of the two kinds of headers on the pages. >I tried to use an xsl:if test"currentPage()= 0", but that isn't working. Right ... because XSLT is going from XML to your rendering language, and the knowledge that the page is at the beginning is known only to your rendering language renderer. When using XSL-FO that is the XSL-FO engine, which knows nothing and has no feedback loop to the XSLT engine. >Is >there another way or better way to suppress information printing in the page >header for the first page only? Depends on which rendering language you are using. "currentPage()" isn't a function of XSL-FO or any rendering language I know, so I can't advise specifically. Look for a way that your rendering language supports two kinds of headers, or perhaps your rendering language has an expression language of its own. For example, though it doesn't work with page numbers, you can express arithmetic calculations in XSL-FO attributes for the XSL-FO engine to resolve, not having to have the XSLT processor resolving them. Sadly, page numbers are not available operands in XSL-FO's expression language, and the expression language is only arithmetic and does not have conditionals. I hope this helps. . . . . . . . . . Ken -- XSLT/XQuery training: after http://XMLPrague.cz 2011-03-28/04-01 Vote for your XML training: http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSL - suppression of page, G. Ken Holman | Thread | RE: [xsl] XSL - suppression of page, G. Ken Holman |
Re: [xsl] Wrapping around textual a, Ramkumar.V | Date | [xsl] Should codepoints-to-string(1, Martin Honnen |
Month |