question about namespace

Ted Slusser <[email protected]> Mon, 17 Feb 2014 15:36:50 -0600
Newsgroups gmane.text.xml.xmlbeans.user
Message-ID <[email protected]>
Hello,

I=92m using XMLBeans 2.6.0 to generate a document based on HL7 CDA.  I =
am setting an attribute on an element and the output looks like:

<code xmlns:urn=3D"urn:hl7-org:v3" xsi:type=3D"urn:CE" code=3D"NI" =
codeSystem=3D"2.16.840.1.113883.6.96" displayName=3D"NI=94>

I would like it to look like this:

<code xsi:type=3D"CE" code=3D"NI" codeSystem=3D"2.16.840.1.113883.6.96" =
displayName=3D"NI=94>

Here=92s the document namespace declaration:

<ClinicalDocument xmlns=3D"urn:hl7-org:v3" =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance=94>

I=92m setting the following in XmlOptions:

    setUseDefaultNamespace();
    setSavePrettyPrint();
    setSaveSubstituteCharacters(createXmlOptionCharEscapeMap());
    setSaveSuggestedPrefixes(createSuggestedPrefixes());
    setSaveImplicitNamespaces(createImplicitNamespaces());
    setSaveNamespacesFirst();
    setSaveAggressiveNamespaces();

And my namespace map is:

    map.put("urn:hl7-org:v3", "");
    map.put("http://www.w3.org/2001/XMLSchema-instance", "xsi=94);

Is there anyway I can get XmlBeans to emit the =93code=94 element =
without redeclaring the namespace?

Thanks,

Ted=