IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Dynamic page headers Options · View
mgo_s4t
Posted: Wednesday, December 9, 2020 1:55:03 PM
Rank: Newbie

Joined: 11/24/2017
Posts: 6
Hello together,

I'm trying to change the page header text on every document section, but somehow on every page I get the result of the first section instead of the current one.

What I'm trying to achieve is something like this

Section 1:
Header: "List of Content"
Body: Table with content

Section 2:
Header: "Definitions"
Body: Some text

Section 3:
Header: "Customer Data"
Body: Table with data


But when processing the result looks like this:

Section 1:
Header "List of Content"
Body: Table with content

Section 2:
Header: "List of Content" (instead of "Definitions")
Body: Some Text

Section 3:
Header: "List of Content" (instead of "Customer Data")
Body: Table with data


I have to use XPath 1 and XSLT 1.
Is it even possible to create the desired result? A simple how to would be very nice.

Thank you in advance.
K101
Posted: Friday, December 11, 2020 2:08:21 PM
Rank: Advanced Member

Joined: 2/27/2009
Posts: 558
It seems to work just fine for me using StyleVision Version 2021. In XSLT 1.0 mode, the attached PDF is produced from the also-attached design file. Which version of StyleVision are you using? Perhaps it's best to contact Altova Support directly for this one.

File Attachment(s):
example.pdf (7kb) downloaded 195 time(s).
example.sps (4kb) downloaded 191 time(s).


mgo_s4t
Posted: Monday, December 14, 2020 10:49:07 AM
Rank: Newbie

Joined: 11/24/2017
Posts: 6
Big thank you K101 for your quick reply.

Unfortunately I've only access to a StyleVision Version 2017. Can you provide me a XSL-FO file? Maybe I can see what I was doing wrong.
mgo_s4t
Posted: Wednesday, December 16, 2020 12:26:58 PM
Rank: Newbie

Joined: 11/24/2017
Posts: 6
Hello,

I managed to solve the issue.

My failure was to create document sections within templates and conditions, cause I wanted to show/hide some pages by user selection.


The previous sps looked like:

Section: Content of report
Content...

if (showDefinition)
Section:
Header: Definitions
Content: Text
end if

for each customer
Section:
Header: Customer data of [customerName]
Content: Table of data
end for


This didn't work. But if the sps looks like this, it works quite fine

Section:
Header: Content of report
Content...

Section:
Header: Definitions
if (showDefinitions)
Content: Text
end if

Section:
Header: Customer Data
for each customer
Content: Data of [customerName]
Table with data


Edit 2021-01-14:
This generates empty pages if I want to skip parts in the report. Currently no solution
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.