Using Entity References in XSL Templates

Subject: Using Entity References in XSL Templates
From: Theodore Epstein <Ted.Epstein@xxxxxxxx>
Date: Thu, 20 Jan 2000 19:27:51 -0500

I'm having a problem with entity references in my XSL templates.  The
entity is defined in the DTD specified in the <xsl:output> tag.  (As it
happens, the output DTD is XHTML, and the entity reference is to &nbsp;
but my question applies to entity references in general.)  But I get a
"reference to undefined entity" error message from the XSL processor.
(I've tried XT, MSXML, and Stylus.)

I know that I can define the entity at the top of the stylesheet, like

    <!DOCTYPE xsl:stylesheet [
    <!ENTITY nbsp "&#160;">

But then the stylesheet processor resolves the entity reference, which
isn't what I want.  I want the entity reference to be *passed through*
to the output, which I can't seem to do.  Am I missing something?


 - Ted Epstein

 XSL-List info and archive:

Current Thread