Tôi đang tạo tệp XSL tùy chỉnh nhỏ để hiển thị nguồn cấp dữ liệu RSS. Nội dung cơ bản, như sau. Điều này hoạt động hoàn hảo trừ khi XML nguồn chứa dòng 'xmlns = "http://www.w3.org/2005/Atom"' trong định nghĩa nguồn cấp dữ liệu. Làm cách nào để giải quyết vấn đề này? Tôi không đủ quen thuộc với các không gian tên để biết cách giải thích trường hợp này.Tạo XSL cho nguồn cấp dữ liệu Atom
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:template match="/" >
<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<body style="font-family:Arial;font-size:12pt;background-color:#EEEEEE">
<xsl:for-each select="feed/entry">
<div style="background-color:teal;color:white;padding:4px">
<span style="font-weight:bold"><xsl:value-of select="title"/></span> - <xsl:value-of select="author"/>
</div>
<div style="margin-left:20px;margin-bottom:1em;font-size:10pt">
<b><xsl:value-of select="published" /> </b>
<xsl:value-of select="summary" disable-output-escaping="yes" />
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Tôi chắc chắn rằng XHTML là an toàn - nó là từ một nguồn nội bộ. Cảm ơn sự hỗ trợ. –