getrailo/railo — pull request #68 by clitnak (2012-11-07 21:04:01+00:00)
Title: XMLElemNew ACF compatibility... prefix & namespaces.

Adobe CF Docs state:
"If you do not specify a namespace URI and use a namespace prefix in the childName parameter, ColdFusion checks to see if a namespace URI has already been specified for the prefix, and if so, uses that namespace."

Railo does not do this to my knowledge. This pull will add this functionality, though I think it could be better.

This fix will get any xmlns prefix declarations from the document root and apply the namespace to the new element with the prefix. Works normally if there is no prefix specified or the prefix does not match a namespace declaration.