Re: [xsl] Change header content dynamically

Subject: Re: [xsl] Change header content dynamically
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Jul 2010 09:42:46 -0400
At 2010-07-27 06:17 -0700, Jean Fautrix wrote:
We are using XML and XSLT to create reports (Through Altova StyleVision 2008 - and we are quite new to all that).
We have the ordinary header and footer (for all of the reports), but
the column names need also to be located in the header, so that it
appears on every new page.


But a few of these reports change the content of its columns so we
need to change all the columns names accordingly to fit the new content.

Fine.


According to the content of the table I would like to be able to
change the content which appears on the header.

Just start a new table with a new <table-header> set of column heads. The <table-header> element is repeated after every page-break.


Note if you had this problem with page columns instead of table columns you would use <marker> and <retrieve-marker>.

Also, if you really needed the table headings to be in the page header instead of a table header, you can also use <marker> and <retrieve-marker>, but since you are explicitly talking about the "content of the table", it would seem best to access this with <table-header>.

How can I use some conditional instruction to do that?

The "conditional processing" in XSL-FO is based on contingencies, not on explicit tests of any kind. When you say "conditional processing" that implies to me you are asking about XSLT, and XSLT knows nothing of page breaks that naturally occur in the processing of XSL-FO.


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