summary in xsl-region-end based on xsl-region-body
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 6
- Joined: Fri Jun 24, 2011 4:56 pm
summary in xsl-region-end based on xsl-region-body
Hi all,
I have a pdf statement listing transactions in a table in my body of my document, each balance has a name and the table is produced for each balance name with a listing of the transactions relating to that balance name.I create a new page when the balance name changes. All this is fine. My problem is that I have a static content in the region-end(top right). This is to be my summary block giving a total of the transactions in/out etc. Now I don't need to compute this in my xsl because it is in my xml. When my statement only has one balance, my summary in the region-end is fine as I just select out STATEMENT/BALANCES/BALANCE_NAME/TOTAL_IN etc.., knowing that I only have one balance to summarise. However, when my statement spans multiple balances,e.g savings one, savings two, I need this summary to change to reflect the change in balance name. Can this be done? how can my region-end summary find out what part of my xml to process based on the xml that my table is showing at the time?
I hope someone can help.
Thanks,
COlm
I have a pdf statement listing transactions in a table in my body of my document, each balance has a name and the table is produced for each balance name with a listing of the transactions relating to that balance name.I create a new page when the balance name changes. All this is fine. My problem is that I have a static content in the region-end(top right). This is to be my summary block giving a total of the transactions in/out etc. Now I don't need to compute this in my xsl because it is in my xml. When my statement only has one balance, my summary in the region-end is fine as I just select out STATEMENT/BALANCES/BALANCE_NAME/TOTAL_IN etc.., knowing that I only have one balance to summarise. However, when my statement spans multiple balances,e.g savings one, savings two, I need this summary to change to reflect the change in balance name. Can this be done? how can my region-end summary find out what part of my xml to process based on the xml that my table is showing at the time?
I hope someone can help.
Thanks,
COlm
-
- Posts: 6
- Joined: Fri Jun 24, 2011 4:56 pm
Re: summary in xsl-region-end based on xsl-region-body
I managed to find a way to do this after much searching. I used a <fo:marker/> embedded within the template where I needed to get my data from. This turned out to be my saviour. In this I could build up my formatted block containing the details I needed and these details changed as the data in the template was processed. You define the marker and give it a name using
<fo:marker marker-class-name="my_marker_name"> block content goers here </fo-marker>
then wherever you want to retrieve the marker in the document you call
<fo:retrieve-marker retrieve-class-name="my_marker_name"/>
In my case, I called this in my static content on the xsl-region-end
e.g.
<fo:static-content flow-name="xsl-region-end">
<fo:block text-align="center">
<fo:retrieve-marker retrieve-class-name="my_marker_name"/>
</fo:block>
</fo:static-content>
I hope this is of some use to anyone else requiring the same although if other methds exist please let me know.
<fo:marker marker-class-name="my_marker_name"> block content goers here </fo-marker>
then wherever you want to retrieve the marker in the document you call
<fo:retrieve-marker retrieve-class-name="my_marker_name"/>
In my case, I called this in my static content on the xsl-region-end
e.g.
<fo:static-content flow-name="xsl-region-end">
<fo:block text-align="center">
<fo:retrieve-marker retrieve-class-name="my_marker_name"/>
</fo:block>
</fo:static-content>
I hope this is of some use to anyone else requiring the same although if other methds exist please let me know.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service