This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] trim space off tag contents
- From: Bob Stayton <bobs at sco dot com>
- To: Gabor Hojtsy <gabor at hojtsy dot hu>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Sat, 26 Apr 2003 17:48:14 -0700
- Subject: Re: [docbook-apps] trim space off tag contents
- References: <200304261852.53355.gabor@hojtsy.hu>
On Sat, Apr 26, 2003 at 06:52:53PM +0200, Gabor Hojtsy wrote:
> Hi!
>
> We used to have a DSSSL customized DocBook sheet, but are migrating to XSL
> based customizations. There are only a few things which are currently not
> correctly handled by the XSL sheets.
>
> One of those is that we would like to strip the space from the begining of and
> from the end of some tags. In DSSSL we simply used 'process-children-trim',
> which trimmed the leading and ending whitespace from the child tag processed.
>
> It is obvious that xslt does not provide any direct solution for this. I have
> also looked into the DocBook lib, but find nothing useful for this. Has
> anyone solved such a problem using XSLT?
The normalize-space() function in XSL removes leading
and trailing spaces, and replaces internal sequences
of whitespace with a single space character.
If you are working with a string at that point, it could
help.
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs at sco dot com
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe at lists dot oasis-open dot org
For additional commands, e-mail: docbook-apps-help at lists dot oasis-open dot org