Capture the line during the frills processing

Hi

I have a question with frills processing and appreciate if anyone could give me a hand.

We are using XPP 8.4 in Unix. We would like to use XyPerl to capture the line and send back to the division during the frills processing. We are able to open the main stream and access named number registers from a frill block but find difficulty in capturing the line.

Does anyone has an idea on this? Thanks

 

Terrence

Parents
  • Hi Terrence,

    There is no direct way to capture or extract the text of a (main text) line during frills processing.

    You would need to capture the text of the line during composition, and then somehow output that text while doing frills processing.

    One way to do that is with text registers (px/pa or cs/ce). Why will that not work for you?

    Another possibility is to capture the text with XyPerl, but that would require that the text you want to capture is "tagged" (i.e. within a start and end tag and that also implies using XML or CSS modes). Your XyPerl would be responsible to "save" the captured text in some way and then you would need to use XyPerl within your frills processing to "output" that saved text.

    You've been kind of sketchy on details; perhaps if you provide more details on your scenario we might be able to give more specific or other suggestions. Or it might be a good idea to open up a ticket with Customer Support, where you can provide all the necessary details (including a sample job).

    Jonathan Dagresta
    SDL XPP Engineering

  • Hi Jonathan,

    Text registers <px;;0> works for me. Unfortunately, it is occupied by the margin notes on the same line. 

    I'm interested to know how do we "save" the captured text and pass it to XyPerl?

    Below is the sample paragraph in which 'AAA' is the right margin notes and 'B1' is the index. The text register is occupied by <ufm>. I'm wondering if it is possible to pass the whole line to XyPerl during frills processing so that I could extract 'B1'.

    %<ufm>AAA<ufn>[tag]B1 The following tables summarize our consolidated financial results during the Track Record Period and should be read in conjunction with the section headed “Financial Information” on pages 10 to 20 of this Prospectus and the Accountants’ Report set out in Appendix I to this Prospectus, together with the respective accompanying notes.

    Terrence

  • Terrence,

    I think you are better off preprocessing (=transforming) the incoming text so that you can mark the end of the second capture, so that things look like:
    %<ufm>AAA<ufn>[tag]<index>B1</index> The following tables summarize..

    Like this you do not have to capture the whole para in xyPerl. You do not want to do this because it makes editing the text in the xyview a lot more difficult.

    As for the <index>..</index> macros, you define them to call a xyPerl function with the 'i' mode flag set so that you capture just the B1 thing.
    remark 1: do not forget to sue the '+' sign as the first character in the expansion of the <index> macro.
    remark 2: do not forget to strip the <index> and </index> macros from the captured text in your xyPerl

    As for storing multiple occurrences of the <index> thing on the same page, there are several solutions possible.
    Probably the easiest one is to use an array (@Index) and push each capture onto the array.
    And then during frills processing you unshift each index term every time you hit a line with an <index> macro.
    (you will need to flag these line and find a way of knowing if the flag is used for a margin note or an index term).
    At the end of the frills processing you undef the @index arrary so it is ready for the next page.

    You might come up with another solution that suits your needs better.
    Like if the index term always appears where there is a margin note, you might put both pieces of text into the 0 register using a slightly different transformation and split them later using xyPerl.

    Good luck.

    Bart

Reply
  • Terrence,

    I think you are better off preprocessing (=transforming) the incoming text so that you can mark the end of the second capture, so that things look like:
    %<ufm>AAA<ufn>[tag]<index>B1</index> The following tables summarize..

    Like this you do not have to capture the whole para in xyPerl. You do not want to do this because it makes editing the text in the xyview a lot more difficult.

    As for the <index>..</index> macros, you define them to call a xyPerl function with the 'i' mode flag set so that you capture just the B1 thing.
    remark 1: do not forget to sue the '+' sign as the first character in the expansion of the <index> macro.
    remark 2: do not forget to strip the <index> and </index> macros from the captured text in your xyPerl

    As for storing multiple occurrences of the <index> thing on the same page, there are several solutions possible.
    Probably the easiest one is to use an array (@Index) and push each capture onto the array.
    And then during frills processing you unshift each index term every time you hit a line with an <index> macro.
    (you will need to flag these line and find a way of knowing if the flag is used for a margin note or an index term).
    At the end of the frills processing you undef the @index arrary so it is ready for the next page.

    You might come up with another solution that suits your needs better.
    Like if the index term always appears where there is a margin note, you might put both pieces of text into the 0 register using a slightly different transformation and split them later using xyPerl.

    Good luck.

    Bart

Children
No Data