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

Re: &ndash problem and netscape.

Subject: Re: &ndash problem and netscape.
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 20 Nov 2001 09:48:11 +0000
ndash xml
Hi Ling,

> the generated xml is look like :
>
> ...
> <para>July 2 ? Aug 25, 2001</para>
> <para>(8 weeks)</para></td>
> ...
>
> is it anyway to keep the &#8211; instead of - ? because i need to
> use the output xml file to render with cocoon, and when i view the
> page ( after process by cocoon ) with IE, the - is shown correctly,
> but when i use the NS4++, the character &ndash is shown. I notice
> that NS4 ++ can't support &ndash but can support &#8211.

I think that the problem here might be that Cocoon doesn't use the
output instructions that you put in the stylesheet, but instead
applies a formatter according to the cocoon.properties configuration
file. You might want to change the default so that it outputs XML
instead, by changing the formatter.default line in cocoon.properties:

formatter.default = text/xml

Or you should add a processing instruction to the source XML file to
tell it to use the XML formatter rather than the HTML formatter:

<?cocoon-format type="text/xml"?>

As it was, using the HTML formatter, the ndash was being escaped as
the character entity reference &ndash;, which is what NS was having
problems with. With the XML formatter, the ndash character will be
output as an ndash character rather than a character reference (or a
character entity reference).

If you want the character reference &#8211; rather than the raw ndash
character, then you should change the encoding of the output to
ISO-8859-1 or something such that 8211 is out of range of the
characters that the encoding can handle. Again you need to do this
through cocoon.properties, by adding the line:

formatter.text/xml.encoding = ISO-8859-1

I hope that helps,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.