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

RE: Page breaks for text-only (not HTML) output?

Subject: RE: Page breaks for text-only (not HTML) output?
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Wed, 13 Sep 2000 23:43:16 +0100
perl page break
>ok output a <FF> tag where you want the page break then post process the
>.txt file to change <FF> to x0C. You could do it in 3 lines of perl or 6 or
>so lines of javascript and it wouldn't take too long.
>
something like this off the top of my head
perl
C:> xalan source.xml transform.xsl sansff.txt
C:> type sansff.txt | perl convert.pl > withff.txt
convert.pl----------------------
#!perl
binmode;
my $slurp = join('', <>);
$slurp =~ s/<FF>/\x0C/gs;
print $slurp;

JavaScript
C:> xalan source.xml transform.xsl sansff.txt
C:> cscript convert.js sansff.txt withff.txt
convert.js----------------------
var fso = new ActiveXObject("Scripting.FileSystemObject");
var file = fso.OpenTextFile(WScript.Arguments(0), 1);
var fileStr = file.ReadAll();
fileStr = fileStr.replace(/<FF>/g , String.fromCharCode(12)); // or ""
pasted ff char
var outFile = fso.CreateTextFile(WScript.Arguments(1), true);
outFile.Write(fileStr);

Ciao Chris

>XML/XSL Portal
>http://www.bayes.co.uk/xml
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 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.