This is the mail archive of the xsl-list@mulberrytech.com mailing list .


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

Re: How to get a nbsp


Shelly Nippard wrote:
> i'm using eXcelon Stylus

ugh. My and my coworkers' experience with this product is that it was far
more trouble than it was worth. Maybe they've improved it by now, but it
doesn't sound like it.

> and the xsl processor for Sylus recognizes the following as a space:
> 
> <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>

&nbsp; here is an entity reference. The only entities XML knows about by
default are &lt; &gt; &quot; &apos; &amp;. You must define all others.
If Stylus lets you get away with something like the above, without &nbsp;
having been declared, it's in error.

The disable-output-escaping doesn't affect how the stylesheet is
interpreted. It only flags the text node that you're creating (which will
contain whatever &nbsp; has been defined to be) as not needing escaping
upon output. If you define &nbsp; to be &#160; (the non-breaking space
character), then it should have the effect of making the text node be
emitted as the byte(s) for a non-breaking space character, rather than as
&#160; &#xA0; or &nbsp;, depending on your output method.

> this is NOT, however, recognized with a Lotus processor....does anyone know
> the syntax to create a space that will be recognized by a Lotus xsl
> processor?

Easiest thing to do is don't use &nbsp; in your stylesheet; write &#160;
or &#xA0; instead. Alternatively you can declare the nbsp entity in the
internal subset... add to your stylesheet, just below the <?xml ...>,
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

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