Re: [xsl] Expanding Tabs

Subject: Re: [xsl] Expanding Tabs
From: Alex Muir <alex.g.muir@xxxxxxxxx>
Date: Mon, 29 Mar 2010 22:16:04 +0000
Hi,

Yeah the translate won't work given tabs can represent various numbers
of spaces depending on the text before the tab.

I'm not certain what OS the code will be running on in the future.

It would be a nice feature given the unparsed-text function and the
need to convert non xml documents into xml and the random use of tabs
and spaces might cause problems with my logic but that's just a hunch.

I did come across something of interest when searching for xsl expand
tabs... in the XSL Working Draft 16-December-1998:
     http://www.w3.org/TR/1998/WD-xsl-19981216#expand-tabs

Will investigate more and work something out.

Regards
Alex

On Mon, Mar 29, 2010 at 9:13 PM, Michael Kay <mike@xxxxxxxxxxxx> wrote:
>>
>> I'm looking for the the xslt equivalent of the expand command
>> in unix to apply to a text input file and surprised I'm not
>> finding anything with a google search.
>>
>> The expand command changes the tabs to the appropriate number
>> of blanks, and writes the results on the standard output.
>>
>> http://www.softpanorama.org/Tools/expand.shtml
>>
>
> If the expand command in UNIX does the right thing, why not use it?
>
> I think most people achieve this kind of effect using special-purpose
> buttons in their IDE these days.
>
> Regards,
>
> Michael Kay
> http://www.saxonica.com/
> http://twitter.com/michaelhkay
>
>



--
Alex
https://sites.google.com/a/utg.edu.gm/alex

Some Good Music
http://sites.google.com/site/greigconteh/

Current Thread