Detecting language please wait for.......
A question about how to generate a directory using the xpp automation program, a book that includes the preface and the body, how to generate a directory between the preface and the body,Or merge the separately generated directory between the preface and the directory of the main article (the page number between the preface and the directory needs to be obtained by the program)
#system("$XyScript::XYV_EXECS/bin/divmerge -p5 DIV_catalog -cd C:/XPP/std_jobz/alljobz/CLS_book/GRP_book/JOB_book/DIV_test9");
-p5 is replaced by the program to get the title tag in DIV_test9 Page number
Rather than using divmerge to "insert" some content into an existing division, most customers use a different method.
The "directory" (or TOC - table of contents) is typically generated as a separate DIV (division) using the CITI process (see the Using CITI manual citi.pdf).
The preface and body parts are also separate divisions in the same JOB.
Then the DA (Document Assembly) ticket (or spec _da_job.sde) is used to organize the order of these DIVs for the final "book". Using the DA ticket you can specify the DIV(s) generated by CITI (which can include index DIVs as well) and when using "Job processing" the DIVs that are included and their order and which processes to run on each DIV (such as citi, compose, print, pdf, etc.).
For information on Job Processing see the Chapter "Job Processing" in the User Guide manual (user.pdf). There is information on Job Processing in many other manuals as well (specific to the XPP programs and specs being discussed in those manuals).
And just to add another possibility: In the XML world of XPP, I would say that most of the TOC's are no longer being generated by CITI, but rather by using an XSLT transformation. The big difference between using CITI and XSLT is that CITI is a post-process that you need to run when the job is finished. XSLT is a pre-process that you run during import or before the actual import in XPP. If your job is contained in a single division, then using XSLT will make your life a lot easier than trying to run CITI. If your job is split into several divisions then it will be a little big more complicated. And if your job is not in XML, then forget what I said... (XSLT can only be used with XML)
Great...that is step 1. The way to get the page number in is to use cross referencing. Have a look at the macros rf and rx in the xymacro manual. You set a reference point by using the rx macro and a unique id. The best way to set these is to modify your style setup to include an rx in the preprocessing field of the title tags. In your directory you use the rf macro to reference the same unique id. You can then use the %refpg4 (and others) to generate the page number you are referering to. Again it is best to insert those into the pre or post processing fields of the tags you used to create the directory. If your xml does not contain the necessary unique ids, you can generate unique ids through xslt and include these somewhere as an extra attribute on the tags that need it. If you want to make your life easy you can do this as a step before you generate your directory. It is a bit more of an xslt challenge to do this in the same stylesheet...:-) Good luck! Bart