title: XML Schema for parent-child relation and reference elements
body: <p>Hi 
  I have a xml file with following strcuture. 
  what should be the valid schema for same. The schema generated for the xml file using XSD.exe won't validate the xml file if i change parent-id value to some non-existing id in department element.</p>
  
  <p>The image for the xml strcuture is on following link --</p>
  
  <p><a href="http://4nic6g.bay.livefilestore.com/y1pT0fhWbJVN-tGaVUJXtF4wz4_qsvC_iBMvtXt364Ef3icT8725_N1nsY6qwqBPfMFCjttlc1tmospd5yYQHjzL9PO-HhJc9tk/image1.png?psid=1" rel="nofollow">http://4nic6g.bay.livefilestore.com/y1pT0fhWbJVN-tGaVUJXtF4wz4_qsvC_iBMvtXt364Ef3icT8725_N1nsY6qwqBPfMFCjttlc1tmospd5yYQHjzL9PO-HhJc9tk/image1.png?psid=1</a></p>