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: [QUESTION] translating whitespaces into  


On Fri, Oct 04, 2002 at 10:54:15PM +0200, Daniel S. Haischt wrote:
> but saxon should support the unicode representation
> of extended characters, shouldn't it?
> 
> and according to my unicode table   is equivalent to
>  

Perhaps I wasn't clear.  Saxon does indeed
produce   HTML output from   input.
It is xsltproc that does not.

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: bobs@caldera.com
> 
> > -----Ursprungliche Nachricht-----
> > Von: bobs@caldera.com [mailto:bobs@caldera.com]
> > Gesendet: Freitag, 4. Oktober 2002 21:40
> > An: Daniel S. Haischt; docbook-apps@lists.oasis-open.org
> > Betreff: Re: DOCBOOK-APPS: [QUESTION] translating whitespaces into
> >  
> > 
> > 
> > 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  
> > > 
> > > 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: bobs@caldera.com
> > 
> > 
> > 
> 

-- 

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: bobs@caldera.com


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