← Prev in month ← Prev in thread

AW: DOCBOOK-APPS: [QUESTION] translating whitespaces into  

From
Daniel S. Haischt <>
Date
2002-10-04T20:56:39+00:00
ID
Thread
AW: DOCBOOK-APPS: [QUESTION] translating whitespaces into &nbsp;
but saxon should support the unicode representation
of extended characters, shouldn't it?

and according to my unicode table &#160; is equivalent to
&nbsp;

regards

daniel s. haischt
--

> -----Ursprungliche Nachricht-----
> Von:  [mailto:]
> Gesendet: Freitag, 4. Oktober 2002 21:40
> An: Daniel S. Haischt; 
> Betreff: Re: DOCBOOK-APPS: [QUESTION] translating whitespaces into
> &nbsp;
> 
> 
> On Fri, Oct 04, 2002 at 01:31:56PM +0200, Daniel S. Haischt wrote:
> > hello,
> > 
> > this question might be likly off-topic...
> > 
> > i am having a stylesheets that produces some
> > HTML output (taking a website xml file as input).
> > 
> > sometimes i'll like to translate every whitespace
> > that occures in a plain text string into &nbsp;
> > 
> > example:
> > 
> > ----------8<-----------8<-----------8<----------
> >  This is a foobar sentence.
> > 
> > sould be translated into:
> > 
> >  This&nbsp;is&nbsp;a&nbsp;foobar&nbsp;sentence.
> > ---------->8----------->8----------->8----------
> > 
> > i used the XSLT translate() function to accomplish
> > this.
> > 
> >  translate('This is a foobar sentence.', ' ', '&#160;')
> > 
> > unfortunatly this does not produce the desired result.
> > so how is it possible to translate whitespaces into
> > &nbsp;?
> 
> Hmm, when I do this translation with Saxon, it works and
> produces &nbsp; in the output.  When I do it with xsltproc,
> I just get plain spaces.  When I use a different character
> such as &#161; I get an inverted ! as expected, This means
> the translation is working, it just isn't outputting &nbsp;
> for &#160;.
> 
> Further investigation shows that the Saxon processor
> outputs HTML entities for other characters, when they
> are defined. Saxon outputs &iexcl; for &#161;, while
> xsltproc outputs the octal character in
> the character set.  
> -- 
> 
> Bob Stayton                                 400 Encinal Street
> Publications Architect                      Santa Cruz, CA  95060
> Technical Publications                      voice: (831) 427-7796
> Caldera International, Inc.                 fax:   (831) 429-1887
>                                             email: 
> 
> 
>
← Prev in month ← Prev in thread