RE: [xsl] Output  

Subject: RE: [xsl] Output  
From: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 30 Jan 2002 17:15:24 +0200
Hip hei,

> <xsl:text disable-output-escaping="yes">&nbsp;</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 "&#x00A0;"> <!-- 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 &amp;, i.e.

<xsl:text disable-output-escaping="yes">&amp;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>&#xA0;</xsl:text>

instead.

Santtu

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


Current Thread