Quantcast
Channel: Changegin doctype root element to rss from html using xslt? - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by Dimitre Novatchev for Changegin doctype root element to rss from html using xslt?

$
0
0

Here is a simple example:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" indent="yes" doctype-system="http://www.silmaril.ie/software/rss2.dtd" doctype-public="-//Netscape Communications//DTD RSS 0.91//EN"/><xsl:template match="/"><rss><channel/></rss></xsl:template></xsl:stylesheet>

when any XML document (not used) is processed with this transformation, the wanted, correct result is produced:

<!DOCTYPE rss  PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN""http://www.silmaril.ie/software/rss2.dtd"><rss><channel/></rss>

Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles



Latest Images