Using special characters in XSL
I am trying to include special characters such as £, #, " in an XSL document, but have been unable to find a good way to do this. If anybody can suggest a way to achieve this, I'd be very grateful. Example below.
Nick
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<HTML>
<HEAD></HEAD>
<BODY>
<TABLE>
<TR>
<TD>Account Name</TD>
<TD>Finish</TD>
<TD>Start</TD>
<TD>Completed</TD>
<TD>Completed Date</TD>
<TD>Day</TD>
<TD>User</TD>
<TD>Your Name</TD>
<TD>Company Name</TD>
<TD>Job Title</TD>
<TD>Would you like to attend?</TD>
</TR>
<xsl:for-each select="NewDataSet/Table">
<TR>
<TD>
<xsl:value-of disable-o开发者_如何学Cutput-escaping="yes" select="Account Name"/>
</TD>
<TD>
Just put the characters in the file as is, £ and # aren't special characters.
Your problem is the
this is not a known entity in XML only in HTML and hence your XSL is invalid. I would use  
which is the unicode character entity for the non-breaking space.
Save your file as UTF-8 is also a good idea.
You can use the xsl:text tag for this, link text
精彩评论