We are troubleshooting an issue impacting community login, and it may be intermittently unavailable. Sorry for any inconvenience.
So does that mean that every chapter has an <intro> element? You might want to try it with
count(preceding::chapter) + 1
to see whether that works better. (If your division element is named something other than "chapter", of course modify the XPath to reflect that.)
Are you trying to put this generated text into a formal page header or footer? If so, then XPath won't work, because headers and footers don't have an element context in the same way that flow text elements do. In that case you'll probably have to rely on Arbortext's built-in numbering features, as the TOC does.
As for numbering in the way the TOC does it, you would have to enable numbering for the thing you are styling. See the Help Center for more information about division numbering (look for the topic "Labeling and Numbering Divisions" as a good place to start).
--Clay
to set the UFE to any value using Xpath or other and using the ufe with new value.
Hi Sriram--
It's not quite clear what your goal is here, but if it helps: in the Styler Generated Text dialog, on the Insert menu, there is an option to insert an XPath string. So, if you are trying to build something like this:
<_ufe:MyUFE>{some string generated using XPath}</_ufe:MyUFE>
You can just insert the UFE you want, put the caret inside the UFE, select Insert->XPath String, and define the XPath expression you want to use to get the string.
If you have something else in mind, perhaps you could elaborate what you are trying to do with an example.
--Clay
Hi Clay,
My aim is to show the Chapter Page in pdf. The source xml does not have any tag like "Chapter Number" to show the number.
So i am bit lost to achieve the Chapter numbering (say 1 for first Chapter , 2 for Second and so on...).. The chapter page is build with pageset and regions but the incremental numbering for chapter is where I am stuck.
My idea was to initalize a ufe-element with variable 'count=0'.And then to increment it accordingly. But not sure to do it. Another alternative i tried was to modify the source-edit but it seems quiet complex. A UFE element is not allowing to associate to "Element Number" from the Gentext.
Can you pls suggest a solution.
Regards,
Sriram Rammohan
Hi Sriram--
OK, then the XPath you want is probably a count of some kind. Try something like this:
count(preceding::chapter) + 1
That should give you something that numbers your chapters.
I would strongly advise against trying anything with source edits, since you are still pretty new to Arbortext and Styler. Most of what you will want to do can (and should) be done without source edits.
--Clay
Thanks Clay for your idea . But unfortunately its not working ,the chapter number returns 1 always.
count(preceding::intro) + 1 // I used intro as my xml has intro element whose <shorttile> is the Chapter Name.
any clue pls?
I used the XPath under Generatedtext to do this. Not the xpath available under elementcontent.
I believe to build the ToC (Element Number) is used which dynamically fetches the Number in Toc Table. But the ElementNumber is not available (available as Hidden string )elsewhere. Is ther a way to use Element Number in this case ?
So does that mean that every chapter has an <intro> element? You might want to try it with
count(preceding::chapter) + 1
to see whether that works better. (If your division element is named something other than "chapter", of course modify the XPath to reflect that.)
Are you trying to put this generated text into a formal page header or footer? If so, then XPath won't work, because headers and footers don't have an element context in the same way that flow text elements do. In that case you'll probably have to rely on Arbortext's built-in numbering features, as the TOC does.
As for numbering in the way the TOC does it, you would have to enable numbering for the thing you are styling. See the Help Center for more information about division numbering (look for the topic "Labeling and Numbering Divisions" as a good place to start).
--Clay
Hello Clay ,
Thanks a lot for your solution . We were able to achieve it by styling the intro elment as division . As a result DivisionReference got created .
So now we ahve 2 options that is working.
1.Either to use DivRef -> label to get the ChapterNumber
2. Use Xpath you proposed , count(preceding::intro) + 1
Thanks