Skip to main content
1-Visitor
July 7, 2011
Question

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

  • July 7, 2011
  • 3 replies
  • 1074 views

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

    18-Opal
    July 7, 2011
    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


    1-Visitor
    July 7, 2011

    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


    1-Visitor
    July 7, 2011
    If you are using FOSI you can use <e-i-c gi="title" context="topic" occur="first">