Skip to main content
Participant
January 30, 2024
Answered

Building blocks in TOC for structured documents

  • January 30, 2024
  • 2 replies
  • 403 views

I am trying to get a TOC to generate based off of a number of elements in a structured FrameMaker document pulling from an XML file. Currently, I don't have a book with separate chapters, rather the chapters are an element I have created in the EDD. When I build my TOC, I have not had any luck with other building blocks other than the standard <$elemtextonly> and <$pagenum>. I would like to pull an attribute from the Chapter element that includes the chapter number into the TOC, but I can't find any way to write the building block that would make this work. I have tried <$attribute[TaxSort]> where TaxSort is the chapter number, and I think I have tried various alterations of the above, but it just prints the text rather than pulling the chapter number. 

Is there a comprehensive list somewhere of which building blocks can be used in which contexts? I have run into this issue in other situations where I try a building block that works in one place but it doesn't translate. Am I just causing myself a headache by not converting the XML file into a book with true chapters in the first place?

This topic has been closed for replies.
Correct answer yatani

I investigated which tags can be used when generating a table of contents in a structured document.
The available tags are as follows.
<$pagenum>
<$volnum>
<$chapnum>
<$paratext>
<$paranum>
<$paranumonly>

<$paratag>
<$elemtext>
<$elemtextonly>
<$elemtag>
Unfortunately, it seems that attribute values cannot be used.
I hope this information is useful.

2 replies

yataniCorrect answer
Participating Frequently
February 2, 2024

I investigated which tags can be used when generating a table of contents in a structured document.
The available tags are as follows.
<$pagenum>
<$volnum>
<$chapnum>
<$paratext>
<$paranum>
<$paranumonly>

<$paratag>
<$elemtext>
<$elemtextonly>
<$elemtag>
Unfortunately, it seems that attribute values cannot be used.
I hope this information is useful.

Participating Frequently
February 2, 2024

The following tags were also available:
<$sectionnum>
<$subsectionnum>

frameexpert
Community Expert
Community Expert
January 31, 2024

I have been googling around trying to find a comprehensive list of generated list building blocks, but I haven't had any success. If you are trying get a chapter number, can you use an autonumber instead and use <$elemparanumonly> or <$paranumonly>? You might achieve a non-stock result through XSLT or scripting.