Re: [xsl] Handling &nbsp

Subject: Re: [xsl] Handling &nbsp
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 4 Apr 2001 14:58:05 +0100 (BST)
> I'm transforming an xhtml document and can't figure out how to handle CDATA
> such as &nbsp.

that's what FAQ lists are for (see www.dpawson.co.uk)

> Ive got this to work:

>     <xsl:template match="p[.='&#xa0;']">

well that's the correct thing to do. You can only use &nbsp; in an XML
file if you define the entity to be something, and if you want it to be
the same as HTML you would have to define it to be &#xa0; in which case
using &nbsp; and using &#xa0; would be the same thing.

But are you really expecting to find paragraphs in your source document
that consist of _only_ a non breaking space. They would be really
strange paragraphs!


David

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


Current Thread