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>