Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help generate dynamic table in xslt for apache FOP

997911Mar 19 2013 — edited Apr 14 2013
down vote favorite


For the following xml file, i need to generate an xsl-fo file to be converted into pdf.

I am new to style sheets and struggling to create dynamic table. Please help.

Also, the width for each column varies,based on the column.How would i include this into the code?

The Column Headers and Column Values are dynamically populated in the xml file. Below is a sample.

Can anybody please help in generating xsl-fo or xslt code?

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ReportData>

<ColumnHeaders>
<ColumnHeader>
<Name>Col-Header1</Name>
<Width>5</Length>
</ColumnHeader>
<ColumnHeader>
<Name>Col-Header2</Name>
<Width>10</Length>
</ColumnHeader>
<ColumnHeader>
<Name>Col-Header3</Name>
<Width>8</Length>
</ColumnHeader>
</ColumnHeaders>

<Rows>
<Row>
<Column>Row1-Col1</Column>
<Column>Row1-Col2</Column>
<Column>Row1-Col3</Column>
</Row>
<Row>
<Column>Row2-Col1</Column>
<Column>Row2-Col2</Column>
<Column>Row2-Col3</Column>
</Row>
</Rows>
</ReportData>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 12 2013
Added on Mar 19 2013
4 comments
7,465 views