Author Topic: Table headers in document fragments  (Read 2255 times)


  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Table headers in document fragments
« on: October 31, 2014, 02:19:37 pm »
If I render elements into a table within a document template, and set a row as the header row it only shows the header row once (unless I add something else in the element section, for example child elements or linked document, even if there is none it seems to break the table).

I have to remove any additional line breaks, even those in the yellow tags for this to work, but I can get it to work.

My issue is I have different formats for different elements, so I insert a document fragment (a selector) then each specific template has the package and elements section (with line breaks removed) and a table containing the same header row and data row. When I do this it generates one big table but every second row is a header row.

Is there some special trick? or does this just not work?

Stephen Kropp

  • EA User
  • **
  • Posts: 27
  • Karma: +1/-0
    • View Profile
Re: Table headers in document fragments
« Reply #1 on: October 06, 2016, 08:54:30 am »
Sorry to bring this thread back to life but I am having the same problem.

I am following the guidance from this page:

When I create a table directly within a Template the table is generated correctly with one Header Row.

But I want to reuse the table in other templates so I cut the table from the Template that was working and paste it into a new Fragment, then call the Fragment from the same location in the Template, but the header row is repeated as if it wasn't classified as a Header Row.

Is there a problem with the placement of code within the Section tags of my Template or Fragment?

Here is my Template:
package >
package element >
linked document >
< linked document
< package element
diagram >
----Diagram stuff here------
element >
[Template - Requirements Table Fragment}
embedded elements >
< embedded elements
child elements >
< child elements
< element
child packages >
< child packages
< package

Here is my Fragment:
package >
element >
Requirement (Formatted as a Header Row)
< element
< package
« Last Edit: October 06, 2016, 08:56:11 am by Stephen Kropp »


  • EA Administrator
  • EA User
  • *****
  • Posts: 589
  • Karma: +7/-0
    • View Profile
Re: Table headers in document fragments
« Reply #2 on: October 06, 2016, 02:14:04 pm »
A template fragment placed in the Element section is called separately for each Element - hence it creates a table Header for each element. So the Template Fragment is best called on a higher level - the Package section. This will provide a consistent table format for all elements in that package (having different table formats would not make sense).

A note for the first post - if you are using the Template selector - this will not operate as the template selector is based on Element type and is operative on each element - not in the package section.