Quantcast
Channel: PTC Community: Message List - Arbortext
Viewing all articles
Browse latest Browse all 3717

Re: How to know the last page of a title in a TOC?

$
0
0

There isn't any information by default, but you could add some if you like.

Use something like

formatting.currentXMLNode.setUserString("lastPage", formatting.currentPage.pageNumber);

in the 'onExit' source for your title (better still in the onExit code of a property set associated with the title).

You can then use XPath in your ToC to retrieve that information using something like:

formatting.evaluateXPath('x3b2:get-userData("lastPage", self::refNode())');

Use that in the generated ToC elements somewhere...

 

setUserString() is a DOM method to add private info onto a node. The get-userData() XPath extension function is an XPath equivalent. self::refNode() is a custom location passed by nodes which are augmented onto a DOM when adding a TOC.

 

Simon


Viewing all articles
Browse latest Browse all 3717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>