def to_xml( xel_parent )
externalID = "PUBLIC\n" + " "*9
externalID += "'-//FH Wiesbaden FB DCSM//DTD XML Representation of EDI data V1.2//EN'\n"
externalID += " "*9
externalID += "'http://edi01.informatik.fh-wiesbaden.de/edi4r/edi4r-1.2.dtd'"
xel_parent << REXML::XMLDecl.new
xel_parent << REXML::DocType.new( normalized_class_name, externalID )
rc = super
xel = rc.first
pos = self.class.to_s =~ /EDI::((.*?)::)?Interchange/
raise "This is not an Interchange object: #{rc}!" unless pos==0
xel.attributes["standard_key"] = ($2 and not $2.empty?) ? $2 : "generic"
xel.attributes["version"] = @version
xel.attributes.delete "name"
rc
end