Re: [xsl] Dimitre's Text Editor (was Re: [xsl] Should XSLT be used to generate a plain text document)?

Subject: Re: [xsl] Dimitre's Text Editor (was Re: [xsl] Should XSLT be used to generate a plain text document)?
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Thu, 28 Apr 2005 06:31:37 +1000
Hi Jay,

> Hi, Dimitre,
> That's a neat idea. I can think of tons of good things for a text editor
> (I'm sure we all can). Here are a few that come to mind: Syntax
> highlighting, User-selectable font (family and size), Smart element
> insertion (so that I can quickly wrap one element around another in all
> the tagged markup languages).

Some of these features may be more difficult than others, but all
could be implemented -- as we know XSLT is Turing-complete.

> However, I recognize that you aren't trying
> to make a salable product. So I suppose sticking to just the very basics
> (similar to Notepad) is the wise course.

Yes, and I'm not even sure I'll have the time -- this is just one of
several very interesting and challenging tasks.

> My only quibble so far is that I'd want to see the extra spaces for
> justification inserted evenly rather than randomly. Mind you, I never use
> right justification in a text editor anyway. However, if I did use it, I'd
> want it to be evenly done.

Only (the remainder) spaces which cannot be spread evenly over the
interword (whitespace or delimiter) groups will need to be distributed
in a random way.

So, if there are 4 spaces to be added to 3 interword groups, we add a
space to each group but where do we put the remaining fourth space? In
order not to observe "white rivers" (which will happen for example if
we always put these remaining spaces sequentially), I would choose the
positions of the remaining spaces in a random way.


> Just my $.02.
> Jay Bryant
> Bryant Communication Services
> (presently consulting at Synergistic Solution Technologies)

Current Thread