Add instantiation source id... but weird that the xml declation is sometimes included and sometimes not?