Skip to content

Instantly share code, notes, and snippets.

@geekdadley
Created December 9, 2012 07:09
Show Gist options
  • Select an option

  • Save geekdadley/4243714 to your computer and use it in GitHub Desktop.

Select an option

Save geekdadley/4243714 to your computer and use it in GitHub Desktop.
The xsl file with which you can transfer wordpress backup files into formated html
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wp="http://wordpress.org/export/1.0/">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="//item" >
<xsl:apply-templates select="." />
</xsl:for-each>
</body></html>
</xsl:template>
<xsl:output method="html"/>
<xsl:template match="//item">
<h1><xsl:value-of select="title" /></h1>
<a>
<xsl:attribute name="href" >
<xsl:value-of select="link"/>
</xsl:attribute>
<xsl:value-of select="pubDate" />
</a>
<p>
<xsl:value-of select="content:encoded" disable-output-escaping="yes" />
</p>
<hr />
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment