xsl-list
[Top] [All Lists]

Re: [xsl] Expanding Tabs

2010-03-29 17:16:31
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(_at_)saxonica(_dot_)com> 
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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





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

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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>