LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives

XML-L Archives

XML-L Archives


Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font


Join or Leave XML-L
Reply | Post New Message
Search Archives

Subject: Re: Creating entities with XSL 19990813
From: Edd Dumbill <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Thu, 16 Sep 1999 09:08:26 +0000

text/plain (36 lines)

On Thu, Sep 16, 1999 at 11:49:14AM +1200, Warren Hedley wrote:
> Personally, I would still like to generate &nbsp; in my output
> directly, as it is more familiar to the HTML people who might be
> writing XSL stylesheets. Surely there must be a way to do this.

&nbsp; is an entity defined by HTML, not XML. XSL stylesheets must be
XML documents, which creates the problem of &nbsp; not being a defined

There we run into problems, as there is XML1.0 DTD for XSLT, as XML1.0
DTDs don't support namespaces as used by stylesheets.

Using XT, I've been able to achieve the desired effect by doing this:

<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160;">
<xsl:stylesheet  ....

I've then been able to use the entity &nbsp; in my stylesheet.

But this is a nasty hack as far as I'm concerned, and I don't use it: it
takes advantage of the fact that there's no DTD for XSLT. I certainly
wouldn't know if it'll continue to work...

My take: it's a lot easier to remember to write &#160; !!!

> Thanks
> Warren Hedley

Edd Dumbill ------/ a new media consultant, writer & technologist /--
 | Director, Useful Information Company        <>
 | Internet Director, Pharmalicensing    <>
 : UK voice/msg: +44 702-093-6870            UK fax: +44 870-164-0230

Back to: Top of Message | Previous Page | Main XML-L Page



CataList Email List Search Powered by the LISTSERV Email List Manager