मेरा Google साइटमैप xmlns = "http: //www.sitemaps के बिना XSLT ठीक के माध्यम से अच्छी तरह से प्रस्तुत करता है। < urlset> तत्व में संगठन/स्कीमा/साइटमैप/0.9 ", हालांकि, जब मेरा foreach कथन काम नहीं करता है और टेम्पलेट में कुछ भी प्रस्तुत नहीं करता है। मेरा कोड नीचे है। आपकी सहायता के लिए धन्यवाद.एक्सएसएलटी काम नहीं करता है जब मैं xmlns = "http://www.sitemaps.org/schemas/sitemap/0.9"
एक्सएमएल
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{site_url}</loc>
<lastmod>{current_time format="%Y-%m-%d"}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
</urlset>
XSL
<xsl:template match="/">
<html>
<body>
<h2>Sitemap</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Location</th>
<th>Last Modified</th>
<th>Update Frequency</th>
<th>Priority</th>
</tr>
<xsl:for-each select="urlset/url">
<tr>
<td><xsl:value-of select="loc"/></td>
<td><xsl:value-of select="lastmod"/></td>
<td><xsl:value-of select="changefreq"/></td>
<td><xsl:value-of select="priority"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
अच्छा प्रश्न (+1)। एक स्पष्टीकरण के लिए और एक पूर्ण समाधान के लिए मेरा जवाब देखें। –