There's nothing in standard XSLT that allows this, but you could consider using the saxon:doctype extension.
Michael Kay

From: [] On Behalf Of Tomas Kolaci
Sent: 16 February 2005 19:17
Subject: [saxon] How to generate <!ENTITY ..> definitions into output XML by XSLT?

 How would I convert by XSLT (saxon 6.5.3) input XML:
<?xml version="1.0" encoding="utf-8"?>
    <picture alias="pic1" link="graphics\md000111.jpg"/>
    <picture alias="pic2" link="graphics\md000222.jpg"/>
into output XML:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE output PUBLIC "-//something" "output.dtd" [
    <!ENTITY pic1 SYSTEM "graphics\md000111.jpg" NDATA jpg>
    <!ENTITY pic2 SYSTEM "graphics\md000222.jpg" NDATA jpg>
    <picture entityref="pic1"/>
    <picture entityref="pic2"/>
? Is it possible?
 Best regards, Tomas