[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: OMR Mark for folding machine

Subject: Re: OMR Mark for folding machine
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 07 Mar 2003 14:59:45 -0500
omr marks
At 2003-02-24 18:06 +0800, PIERRES@xxxxxxxx wrote:
Currently I want to use XSL to print our company bill statement. But I have
the difficulty to put OMR into the pages since the number of OMR lines to be
printed depending on the page number but the page number is unknown in XSLT
and page number cannot be manipulated in XSL/FO. Does anyone know a solution
for that?

At 2003-03-07 14:56 +0800, PIERRES@xxxxxxxx wrote:
I need to print some horizontal bar on left edge of every pages of a bill
statement which is used to be read by folding machine.
The folding machine will use these bars to detect some information for the
folding processing. (e.g. page sequence, account sequence)
Then the machine will fold the pages for one account into an envelope.

For each account, I need to specify a page sequence no. for each page.
There are four bars, they have values 1, 2, 4 and 8, I can print, and the
total of their values should equal to the page sequence no.
The page sequence no. start from 1 for page 1 to 15 for page 15, then reset
to 1 for page 16 etc.

I would have thought that page 16 would have zero bars and that page 17 would have been reset to 1 ... but my solution stands if the answer goes either way.


If you don't mind having some "typically maximum limit" and then accommodating an overflow condition ... say you accept a 256 page limit ... that no bill will be longer than 256 pages and that if there is one that is 257 or more pages that you accept the XSL-FO formatter throwing an error to signal the pages were not totally completed.

Create as many <simple-page-master>s as you have combinations of bars (so either 15 or 16 based on the answer above ... I'll assume 16). Each <simple-page-master> has a different <region-start> name, say "region-0" through "region-15".

Create a <page-sequence-master> with 256 <single-page-master-reference> children, in order pointing to masters respectively with "region-0",...,"region-15","region-0",...,"region-15", etc.

Create your <page-sequence> pointing to the <page-sequence-master> and including 16 definitions of <static-content> one for each of the 16 combinations of bars, with absolutely positioned block containers with a <leader> rule in each positioned where you want the folding marks.

Then go ahead and format the document! If there are 257 pages in the one bill, the formatter will abend and indicate that it has run out of page geometries for the formatting run. But as long as there are enough single-page-master-references in your page-sequence-master, it will not abend and you will get the pattern of marks in the edge of your paper.

Yes, it would be cleaner and there would be no limit if there were a sub-sequence-repeater object in XSL-FO (how about that as a new requirement for version 2?) but if you can accept the maximum page count and I've understood your requirement then I think you've got what you need.

I hope this helps.

........................... Ken

--
Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO
                             North America:      June 16-20, 2003

G. Ken Holman                mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                      Definitive XSLT and XPath
ISBN 0-13-140374-5                              Definitive XSL-FO
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-10-1              Practical Formatting Using XSL-FO
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.