Subject: RE: Page breaks for text-only (not HTML) output? From: "Chris Bayes" <Chris@xxxxxxxxxxx> Date: Wed, 13 Sep 2000 23:43:16 +0100 |
>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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Page breaks for text-only (not , Chris Bayes | Thread | Re: Page breaks for text-only (not , Alexey Gokhberg |
RE: Page breaks for text-only (not , Chris Bayes | Date | Re: Page breaks for text-only (not , Alexey Gokhberg |
Month |