Re: Complex conditional-page-master-reference force la
Here is the scenario, and will use # of lines to give a feel for the amount of available real estate for each conditional template:
First I confess I'm not really confident I understand your question at all.
But I *think* you are asking how a one-page formatted document with 21-30 lines would be formatted using the last-page page master rather than the first-page page master.
That would be achieved by ordering your conditional page masters such that the first in document order of conditional elements to test true for 21-30 lines is the one that formats the last page rather than the one that formats the first page:
<repeatable-page-master-alternatives> <conditional-page-master-reference master-reference="frame-only" page-position="only"/> <conditional-page-master-reference master-reference="frame-last" page-position="last"/> <conditional-page-master-reference master-reference="frame-first" page-position="first"/> <conditional-page-master-reference master-reference="frame-other"/> </repeatable-page-master-alternatives>
This is because a page with only 21-30 lines satisfies three of the four page masters. Your responsibility as a stylesheet writer is to present the options to the formatter *in the order you want the decision made*. The first page master encountered to fit the criteria will be the one used by the formatter.
There is no obligation for the stylesheet to order the page masters in the order you've cited, but if you've used that order, then the formatter will first be satisfied with the "first" page geometry and won't bother looking at the "any" or "last" page masters.
In the order I've proposed the formatter will be first satisfied with the "last" page master before looking at the "first" or "any" page master. If there are 31 or more lines, then the "last" page master doesn't satisfy the first 30 lines because page-position="last" isn't true when using that page geometry, and it will correctly use the following "first" page master.
I hope I've guessed your requirement correctly and that this helps.
. . . . . . . . . . . Ken
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format