Current position:  Home > Default > Dynamic Columns, using the element name as the column header name

Dynamic Columns, using the element name as the column header name

Time:October 11
BI Publisher Experts,
I'm a relative newbie in the RTF layout world and i'm trying to acheive a layout which dynamically nominates the column headers as the element name.
For example using the XML below:
<?xml version="1.0" encoding="UTF-8" ?>
- <DATA>
<EMAIL>[email protected]</EMAIL>
Excuse formatting, looked ok in preview!
I'd like to acheive the following output:
|-----------------------|---------------------- |--------------------------------------------------------|
| First Name | Last Name | [email protected] |
I've managed to get the row data columns working using:
<[email protected]:current()/*?><?.?><?parent::*/text()?> <?end for-each?>
And i've been working on the header for a while now, using
<[email protected]:current()/THREECOLUMNDATA[1]/*?><?name(.)?><?end for-each?>
But no luck with the header. I only ever get a blank header.
I've also reviewed the following syntax:
<?split-column-header:THREECOLUMNDATA?> <?/FIRST_NAME?>
But of course, this pulls specific element data out as the header, not quite what I need.
Question is: Is there specific functionality to pull the element name out as the header, or do I somehow specifically need to include the header name as a data value in the XML?
Advice appreciated!
If you could get your XML to look like this instead of what you have, you will be able to use split-column-header and split-column-data
<?xml version="1.0" encoding="UTF-8" ?>
<COL_VALUE>[email protected]</COL_VALUE>
Now if you <?split-column-header:COL_DTLS?><?COL_LABEL?> and <?split-column-data:COL_DTLS?><?COL_VALUE?> you'll get the required output...