XSLT と XML を使用して Web ページを生成していますが、IE で動作する単一引用符に問題があります。
Student's
「コースは:」と言うはずのテキストを含む段落タグがあります。また、XML から MORAL PROBLEMS:CONTEMP'RY というコース タイトルを作成しました。
ただし、IE で HTML を表示すると、 として表示さStudent's courses are
れ、タイトルについては として表示されPROBLEMS:CONTEMP'RY
ます。Firefox と chrome では、 と として正しく表示されStudent's courses are:
ますMORAL PROBLEMS:CONTEMP'RY
。
私のXSLTでは、「」を入れるなど多くのことを試しましたが、IEStudent'
ではまだ表示されません。'
ここにXMLがあります
<courses_xml>
<taken_courses>
<course_subj>PHIL</course_subj>
<course_no>235</course_no>
<title>MORAL PROBLEMS:CONTEMP'RY</title>
<term_code>200805</term_code>
<grade>B</grade>
</taken_course>
<taken_courses>
<course_subj>MATH</course_subj>
<course_no>200</course_no>
<title>ADVANCED CALCULUS</title>
<term_code>200805</term_code>
<grade>A</grade>
</taken_course>
<courses_xml>
ここにXSLTがあります
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/">
<html>
<body>
<p>Student's courses are:</p>
<table>
<xsl:apply-templates select="courses_xml"/>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="/courses_xml/taken_courses">
<tr>
<td><xsl:value-of select="course_subj"/></td>
<td><xsl:value-of select="course_no"/></td>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="grade"/></td>
</tr>
</xsl:template>