Huh. Have you tested that this works in 3 cases:
1. If you upload a normal form with no xmlns problems, it doesn't get munged
2. If you upload a form that has the same xmlns as another form in the app,
it gets changed to a random one
3. If you upload a form without an xmlns, a random one gets added



On Tue, Jan 7, 2014 at 2:37 PM, yedi <notifications@github.com> wrote:

> In corehq/apps/app_manager/util.py:
>
> >                  break
> > +
> > +        GENERIC_XMLNS = "http://www.w3.org/2002/xforms"
> > +        if not xform.data_node.tag_xmlns or xform.data_node.tag_xmlns == GENERIC_XMLNS:  #no xmlns
> > +            xform, xml = change_xmlns(xform, GENERIC_XMLNS)
>
> yea so its interesting, i tried it with just " " at first, at didn't work
> because when you render the data node, the generic xform xmlns gets put in
> there, despite it not being in the source xml.
>
> (relatedly: i most likely don't need the replacing parameter, and could
> just always replace the xform.data_node.tag_xmlns (since that returns the
> generic_xmlns when theres no xmlns in the xml), but i felt this might be
> more explicit)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/dimagi/commcare-hq/pull/2222/files#r8703889>
> .
>