我已经粘贴了我的完整xslt:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:content="http://purl.org/rss/1.0/modules/content/" >
<xsl:output method="html"/>
<xsl:template match="/">
<!-- Create a Jobs array -->
<script type="text/javascript">
var jobs = {
<xsl:for-each select="jobs/job">
"<xsl:value-of select='ID'/>" : "<xsl:value-of select='Title'/>",
</xsl:for-each>
"0000" : "Test" // Stop IE8 error message
};
</script>
</xsl:template>
</xsl:stylesheet>
这导致我的html中出现以下javascript:
<script type="text/javascript" xmlns:content="http://purl.org/rss/1.0/modules/content/">
var jobs = {
"J123456" : "Teacher - & Blah Blah",
"0000" : "Test" // Stop IE8 error message
};
</script>
但&amp;标志导致w3c验证失败。我如何输出它作为放大器; ?