Menu

#14 XML Mapper wizard assigns incorrect target namespace

5.0
open
nobody
Designer (42)
5
2008-02-11
2008-02-11
prichards
No

v5.0 b.916

Created New XML Mapper Bizcomp and defined source using input xml example, such as:

<CurrentTermAmt xmlns="http://www.ACORD.org/standards/PC_Surety/ACORD1.7.0/xml/">
<Amt/>
<CurCd/>
</CurrentTermAmt>

and target, typing in window (no namespaces) such as:

<MyAmt>
<Amt/>
<MyAmt>

If you do not map an element and execute the Bizdoc, the correct empty result is returned (same as above target).

However, if you map the CurrentTermAmt/Amt to MyAmt/Amt, the wizard changes the target namespace to the source namespace:

<MyAmt>
<Amt xmlns:p_1="http://www.ACORD.org/standards/PC_Surety/ACORD1.7.0/xml/">55</Amt>
<MyAmt>

This is incorrect - it should only map the value:

<MyAmt>
<Amt>55</Amt>
<MyAmt>

Discussion

  • prichards

    prichards - 2008-02-11

    Logged In: YES
    user_id=1937543
    Originator: YES

    Sorry, this is NOT a bug. The namespace prefix definition is added to the element, not the namespace itself. Since the prefix is required by XAware to reference the correct source value, the namespace prefix definition has to be on the element or a parent. If one doesn't want to see this in the output, one would have to manually edit the file and place the prefix on a parent element (such as the bizcomp root <XMLmapper>).

    The namespace definition does not show up in the tree view of Designer, only in the XML view. It would be nice if Designer provided a way to define (or move) a namespace prefix. And, it would be helpful if the Designer created these namespaces on the root element of the bizcomp, so that they don't appear in the result. (They would then only appear in the result if the target elements also require the same namespace.)

     
  • Jeff Peters

    Jeff Peters - 2008-02-11
    • labels: 1037122 --> Designer
    • milestone: 775304 --> 5.0
     

Log in to post a comment.

MongoDB Logo MongoDB