john.banning-adaptdev
-
5/17/2012 6:00:56 PM
Hierarchical Viewer Header and Footer transformation
I want to create one HTML table for each time I encounter the following document types in my tree, PRODUCT and the child( which may be many) DOWNLOAD. The table should will uses 2 document types to populate the table values. The document types are nested. The parent doc type, Product, contains information that I want to display on the first row of my HTML table. On the subsequent rows in the table I want to display information from the child doc types downloads. As I said, there is a parent-child relationship in the content tree that (Product > Downloads). There are also many products in the content tree. Each of these have downloads associated with them.
The content tree looks something like:
PRODUCT A -DOWNLOAD 1 -DOWNLOAD 2 -DOWNLOAD 3 -DOWNLOAD 4
PRODUCT B -DOWNLOAD 1 -DOWNLOAD 2 -DOWNLOAD 3 -DOWNLOAD 4
I want to open the table tag every time i encounter a Product and close the table tag after encountering the last Download. The table should look like the following:
<table> ------------------------------------------------------------------------------------------------------------------- |PRODUCT NAME | PRODUCT PRICE | PRODUCT DESC ------------------------------------------------------------------------------------------------------------------- |Download1 vers | Download1 price | ------------------------------------------------------------------------------------------------------------------- |Download2 vers | Download2 price | ------------------------------------------------------------------------------------------------------------------- |Download3 vers | Download3 price | ------------------------------------------------------------------------------------------------------------------- </table>
I want to use the hierarchical viewer to do these transformation, but am having issues when I attempt to use the HEADER and FOOTER transformation types. It appears that I cannot use the Header and FOOTER transformations types since they are only executed once, the initial instance of Product and the final instance of Product.
Is there another way to do this ? Am I using the FOOTER and HEADER incorrectly?
|