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

Re: Should XSLT be used to generate a plain text docu

Subject: Re: Should XSLT be used to generate a plain text document?
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 27 Apr 2005 21:19:55 +1000
xslt split lines
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="' &#9;&#10;&#13;'"/>
>      </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

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.