Subject: Re: [xsl] Should XSLT be used to generate a plain text document? From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Wed, 27 Apr 2005 21:19:55 +1000 |
Hi Dave, On 4/27/05, Pawson, David <David.Pawson@xxxxxxxxxxx> wrote: > One function you may find useful is the fxsl split lines from Dimitre. > It generates output split at a given value, by word > > <xsl:call-template name="str-split-to-lines"> > <xsl:with-param name="pStr" select="/*"/> > <xsl:with-param name="pLineLength" select="64"/> > <xsl:with-param name="pDelimiters" select="' 	 '"/> > </xsl:call-template> > > Takes in pStr text, > splits it at pLineLength value > applying pDelimiters at the end of that block. > > str-split-to-lines.xsl in the fxsl library. > > You could use it to generate the wrapped lines, > if that's needed. Thanks for pointing this out. str-split-to-lines has been there fore more than three years -- a more detailed description can be found at: http://www.xslt.com/html/xsl-list/2001-12/msg00612.html I am tempted to produce a simple text editor, totally controlled by an XSLT stylesheet (similar to the way the XSLT calculator is totally controlled by a stylesheet). All necessary functionality already exists: Word breaking (tokenisation). Find/Replace. Text justification (str-split-to-lines pimplements left justification, but it will not be a problem to shift the last word on a line so that its last character is aligned on the right boundary. One can even use the random number generator of FXSL in order to randomly spread the few additional spaces between different words on the line). Spelling checking -- demonstrated recently. Generation of alternative words having correct spelling (if I remember well, I demonstrated on this list how this can be done using FXSL 2-3 years ago) Word count/frequencies -- demonstrated on this list by Mike Kay not long ago. Is there any other major text-editing feature I've missed? Cheers, Dimitre Novatchev.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Should XSLT be used to ge, Pawson, David | Thread | [xsl] Dimitre's Text Editor (was Re, JBryant |
Re: [xsl] Prob with encoding, David Carlisle | Date | RE: [xsl] Getting useful data from , G.Wenden@xxxxxxxxxxx |
Month |