Story24 hdf

I have searched for few modules to create DTD. But it seems that I could only create a internal DTD in the XML itself using 'xmlbuilder'.
So I have two options:
(1) Either add internal set of DTD in xml file.
(2) I refer DTD from the filesystem and add it to HDF record?