| 
 
Subject: RE: [xsl] semi-newbie question about escaping From: Jarno.Elovirta@xxxxxxxxx Date: Tue, 15 Oct 2002 09:36:03 +0300  | 
FAQ,
> The goal here was to output some non-breaking space entities in HTML 
> ( ) to denote indentation.
Why not the character itself?
> I finally got it to do what I wanted, thus:
> 
>     <xsl:choose>
>         <xsl:when test='$level=1'>
>         <xsl:text disable-output-escaping="yes"> 
> &nbsp;</xsl:text>
>         </xsl:when>
>         <xsl:when test='$level=2'>
>         <xsl:text disable-output-escaping="yes"> 
> &nbsp;&nbsp;</xsl:text>
>         </xsl:when>
>     </xsl:choose>
> 
> but I'm wondering if there isn't some easier way?  Thanks
Don't try to generate markup, but rather a tree and let serializer worry about how it will look. 
  <xsl:choose>
    <xsl:when test="$level = 1"> </xsl:when>
    <xsl:when test="$level = 2">  </xsl:when>
  </xsl:choose>
Cheers,
Jarno 
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| Current Thread | 
|---|
  | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] semi-newbie question abou, Mike Brown | Thread | Re:[xsl] semi-newbie question about, Joseph Kesselman | 
| RE: [xsl] getting chinese character, Jarno . Elovirta | Date | Re: [xsl] XML Editor For Linux, Klaus-Georg Adams | 
| Month |