Forum How do I...?

Using flow somewhere else than in headers or footers

BorisK
Hi everoby!

Can I use the "flow" instruction somewhere else than in headers or footers?

More precisely, I introduce in the beginning of each chapter a table of contents and I'd like to place automatically a title (for exemple "Chapter's contents").

How can I manage it? (The title's label must be placed in the xhtml file, as this file has to be translated in several languages, and the translators have no access to the css file.)

I tried the following code:

<p id="Title_chapter_contents">Chapter's contents</p>

p#Title_chapter_contents {
prince-flow: static(title-chapter-contents);
}

div.Chapter_contents	p:first-child::before  {
	content: prince-flow(title-chapter-contents);
}



but unsuccesfully.


Thank you in advance for your help
mikeday
The string-set property can be used to capture text from the document and use it elsewhere, like this:
p#Title_chapter_contents {
string-set: title-chapter-contents contents()
}

div.Chapter_contents p:first-child::before {
   content: string(title-chapter-contents);
}

The contents() means to set the named string "title-chapter-contents" to the contents of the p element.
BorisK
Hi Mike,

I apologize for answering so late, buy I didn't check the forum since almost two weeks.

Thank you for your answer.

Best regards

Boris