Thread Starter
Ronin
(@ronin)
Anybody? I’m hoping to have this fixed today.
Not knowing that much about xml, it is similar to html. The plugin sitemap uses a stylesheet to format it while the poke one does not.
You would need to apply a stylesheet to it. However, a normal .css stylesheet won’t work. You need to add this into the heading
<?xml-stylesheet type=”text/xsl” href=”style.xsl”?>
Then obviously make a file named style.xsl to include the styling you want.
For example:
<?xml version=”1.0″?>
<xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” version=”1.0″>
<xsl:output method=”html”/>
<xsl:template match=”/”>
<html><head><title>sitemap style.xsl</title></head>
<body>
<xsl:apply-templates/>
</body></html>
</xsl:template>
<xsl:template match=”txt”>
<div class=”loc” style=”background-color: red;”>
<xsl:value-of select=”.”/>
</div>
</xsl:template>
<xsl:template match=”lastmod”>
<div class=”lastmod” style=”background-color: red; color: black;”>
<xsl:value-of select=”.”/>
</div>
</xsl:template>
<xsl:template match=”urgent”>
<div class=”xmlstyle” style=”background-color: white;”>
<xsl:text></xsl:text>
<xsl:value-of select=”.”/>
</div>
</xsl:template>
</xsl:stylesheet>
You get the general idea.
Hi Tov3,
I’m having the same problem as Ronin and I have a couple questions about the solution you posted.
The line you said should go into the heading – specifically what heading? Of the sitemap, of the page, of the site?
Also, where do you load the .xsl file?
Thanks a ton and thanks for posting a solution!
Hi,
Is this really a problem? Can’t Google read it in the non-styled format?