This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Output
- From: Jarno dot Elovirta at nokia dot com
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 30 Jan 2002 17:15:24 +0200
- Subject: RE: [xsl] Output
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hip hei,
> <xsl:text disable-output-escaping="yes"> </xsl:text>
>
> Results in error:
> 09:03:47 Error: line 130 col 59: The entity "nbsp" was
> referenced, but not
> declared.
>
> What am I missing?
An entity declaration for the entity "nbsp", like it says. If you want the entity "nbsp" to be a NO-BREAK SPACE character like in "ISO 8879:1986//ENTITIES Added Latin 1//EN//XML", use Document Type Definition
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " "> <!-- NO-BREAK SPACE -->
]>
or you add
<!ENTITY % iso-num.ent PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
"http://www.oasis-open.org/docbook/xmlcharent/0.1/iso-num.ent">
%iso-num.ent;
to your External Subset. However, I think you were looking for the answer that you need to escape the ampersand to &, i.e.
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
*AND* then make sure the doctype-system (and doctype-public) attribute(s) of xsl:output instuction point to a DTD that contains the declaration for entity "nbsp". But you don't want to do that either. Just use
<xsl:text> </xsl:text>
instead.
Santtu
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list