 <p>XML is just a structure that represents Data. DTD is the definition of you xml structure. Non of these are generating ids for you. </p> <p>However XSLT's generate-id() will be suitable for you. You can learn more from w3c <a href="http://www.w3schools.com/xsl/func_generateid.asp" rel="nofollow">http://www.w3schools.com/xsl/func_generateid.asp</a></p>