Oh great, this seems to be exactly what I need! Thank you very much, Tomas
----- Original Message -----
From: Michael Kay
To: saxon-help@lists.sourceforge.net
Sent: Wednesday, February 16, 2005 8:33 PM
Subject: RE: [saxon] How to generate <!ENTITY ..> definitions into output XML by XSLT?

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


From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Tomas Kolaci
Sent: 16 February 2005 19:17
To: saxon-help@lists.sourceforge.net
Subject: [saxon] How to generate <!ENTITY ..> definitions into output XML by XSLT?

 Hi!
 
 How would I convert by XSLT (saxon 6.5.3) input XML:
 
<?xml version="1.0" encoding="utf-8"?>
<root>
    <picture alias="pic1" link="graphics\md000111.jpg"/>
    <picture alias="pic2" link="graphics\md000222.jpg"/>
</root>
 
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>
]>
<root>
    <picture entityref="pic1"/>
    <picture entityref="pic2"/>
</root>
 
? Is it possible?
 
 Thanks!
 
 Best regards, Tomas