[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL and White Space help PLEASE

Subject: Re: XSL and White Space help PLEASE
From: Uche Ogbuji <uche.ogbuji@xxxxxxxxxxxxxxx>
Date: Sun, 17 Jun 2001 18:14:24 -0600
nbsp xsl
>    > but if you're writing HTML then you could use the html output method
>    > and most XSL engines will then output &#160; as &nbsp;.
> 
>    Ooh, that's interesting. The one I'm using (gnome's libxslt) doesn't, at
>    least not the version I'm using, but it sounds like a good idea. Do you
>    know which ones do this?
> 
> 
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                 version="1.0"
>                 >
> <xsl:output method="html" encoding="iso-8859-1"/>
> 
> <xsl:template match="/">
> [&#160;]
> </xsl:template >
> </xsl:stylesheet>
> 
> 
> just tried 3, xt and saxon output as an entity reference, eg:
> 
> bash$ java com.icl.saxon.StyleSheet ~/nbsp.xsl ~/nbsp.xsl 
> 
> [&nbsp;]
> bash$ 
> 
> 
> msxsl outputs it as utf8 character data (presumably because it chose not
> to recognise latin-1.
> 
> Changing that to 
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                 version="1.0"
>                 >
> <xsl:output method="html" encoding="us-ascii"/>
> 
> <xsl:template match="/">
> [&#160;]
> </xsl:template >
> </xsl:stylesheet>
> 
> 
> then msxsl outputs as &#160; (saxon outputs as &nbsp; and xt gives
> UnsupportedEncodingException) 

[uogbuji@borgia tmp]$ cat usasciixslt.xslt 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0"
                >
<xsl:output method="html" encoding="us-ascii"/>

<xsl:template match="/">
[&#160;]
</xsl:template >
</xsl:stylesheet>
[uogbuji@borgia tmp]$ cat spam.xml 
<dummy/>
[uogbuji@borgia tmp]$ 4xslt spam.xml usasciixslt.xslt 

[&nbsp;]
[uogbuji@borgia tmp]$ 


-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@xxxxxxxxxxxxxxx               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
XML strategy, XML tools (http://4Suite.org), knowledge management



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.