This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] trim space off tag contents


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]