cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Calling first title on a page (not a fig or table title)

anne.bovard
1-Newbie

Calling first title on a page (not a fig or table title)

Hi all,


I'm looking for a way to call the first topic title on a PDF page into a header. The GUI in Styler 5.4 gets me about halfway there. I can Insert>Element Content and select the first title started on page, but I end up with fig and table titles as well. Does anyone know if I can use an XPath expression to drill down on a specific page?


Many thanks for your attention,


Anne



3 REPLIES 3

Hi Anne-



If you have your doctype configured correctly, you should be able to do
this using a "Division Reference" rather than "Element Content". This
lets you choose what divisions you want to consider for header titles,
e.g. chapter or section titles but not table or figure titles.



FWIW, XPath is of limited use in header content, because there is no
context element when each page header is resolved, so the XPath
expression is always evaluated relative to the root. If your header is
always the same, e.g. a book title that can be accessed using an
absolute XPath, that will work OK, but you can't do the kind of thing
you are asking about with XPath in Styler.



--Clay



Clay Helberg

Senior Consultant

TerraXML


Hi Clay,


That's perfect- thank you 🙂 I need to do some shifting, but Division Reference should work just fine.


Thanks too, for the info on Xpath...makes sense....only looking at the tree. Thought that was maybe a stretch.


Appreciate your help,


Anne


If you are using FOSI you can use <e-i-c gi="title" context="topic" occur="first">
Announcements

Top Tags