Working as designed, I'm afraid. In attribute data types, CDATA just means "character data" as opposed to ID, IDREF, and so on. (http://www.w3.org/TR/REC-xml/#sec-attribute-types) If you don't want the & in an attribute value to be interpreted as introducing an entity reference, you must replace it with & in the XML markup.
There is no way to obtain the effect of a CDATA Section (<![[CDATA[]]>) in an attribute; these may appear only as part of parsed text content of elements (http://www.w3.org/TR/REC-xml/#NT-content) Yes, it is unfortunate that the term CDATA is used to refer to both. You're not the first to have been confused by this. I believe it's a historical hold-over relating to XML's origins as a simplified subset of SGML. ______________________________________ "... Three things see no end: A loop with exit code done wrong, A semaphore untested, And the change that comes along. ..." -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (http://www.ovff.org/pegasus/songs/threes-rev-11.html)