Skip to main content
1-Visitor
December 13, 2017
Question

read attribute values of a formatted page while formatting APP

  • December 13, 2017
  • 1 reply
  • 2760 views

Hi,

 

How do I capture the value of an attribute of an element on a page while formatting, especially when the element spans over multiple pages?

Basically, I am looking to capture the value of a change attribute(s) found on each page and store it into an array and then display it on the LEP to the corresponding page. I am familiar with store it into an array and then display it.

Thank you in advance!

Have a blessed day!

Florin

1 reply

16-Pearl
December 14, 2017

I'm going to start with an example scenario: you have a revision-marked document where revision information is stored on attributes of elements. You have an instance of an inserted table that spans over three pages, the table itself has an attribute indicating which revision level the change happened. You need to mark these pages as changed pages in an LoEP. Is this an accurate scenario?

 

If so, you have two options.

 

Option 1. Use a counter or Javascript variable to track whether a change is in effect or not (and which revlevel it is at). You can then query this counter/variable at top/bottom of each page to see if a change is rolling over a page boundary. You would have logic in the start-element-tag that captures the first page of the change. Again you would need to use an array variable to mark which pages are changed (where the array index is the sequential page number, if you have fully formatted folios e.g. A-123 then that is an additional concern to consider).

 

Option 2. Mark the changes at the start-element-tag and at the end-element-tag. You would achieve this by using an array variable where the index is a counter that you increment at each changed element. So the final index is the count of all changed elements you encountered during formatting. At each array index you will then store three values. The first value is the revlevel, the second value is the start page for a change (saved at start-element-tag) and the third value is the end page for the change (saved at the end-element-tag). e.g. [ "r3-12-13", "r2-16-29", "r4-88-100" ]. You then need to process those values wherever you display them.

 

Both approaches need a double format. First format pass gathers initial page information. Second format pass will then build out the LoEP from the saved array (assuming a longer LoEP section will itself not affect the page foliios).

otudor1-VisitorAuthor
1-Visitor
December 14, 2017

Hi Gareth,

 

The scenario is correct.

 

Let me digest the options and i will get back with eventually more questions or sloved decision.

 

Thank you for help.

 

Have a blessed day!

Florin