#EXPORT not exporting record structure correctly. Where RECORD names have trailing numbers.

Environment

N/A

Description

Where a name of a RECORD structure has trailing numbers the 'type' attribute of the exported XML is incorrect (these numbers are stripped off.

 

Problem ECL

exported XML

R123456789 := RECORD
     UNSIGNED1 u1;
END;
R2 := RECORD
    R123456789 InnerR1;
END;
#DECLARE(xmlOfRecord)
#EXPORT(xmlOfRecord,R2)
%'xmlOfRecord'%;

<Data>
<Field ecltype="r123456789"
    isRecord="1"
    label="innerr1"
    name="innerr1"
    position="0"
    rawtype="13"
    size="1"
    type="r"/>
<Field ecltype="unsigned1"
    label="u1" 
    name="u1"
    position="1"
    rawtype="65793"
    size="1"
    type="unsigned"/>
<Field isEnd="1" name="innerr1"/>
</Data>

OK ECL

Exported XML correct

Rabcdef := RECORD
   UNSIGNED1 u1;
END;
R2 := RECORD
    Rabcdef InnerR1;
END;
#DECLARE(xmlOfRecord)
#EXPORT(xmlOfRecord,R2)
%'xmlOfRecord'%;

<Data>
<Field ecltype="rabcdef"
           isRecord="1"
           label="innerr1"
           name="innerr1"
           position="0"
           rawtype="13"
           size="1"
            type="rabcdef"/>
<Field ecltype="unsigned1"
           label="u1"
           name="u1"
           position="1"
           rawtype="65793"
           size="1"
           type="unsigned"/>
<Field isEnd="1" name="innerr1"/>
</Data>

 

Conclusion

None

Activity

Show:

Gavin Halliday December 19, 2018 at 9:29 AM

It looks like it removes trailing digits and underscores.   Fairly weird (and ancient) code.  I think it is so unsigned8 has a type of "unsigned".

Allan Wrobel December 17, 2018 at 10:55 AM

I've only tried trailing numbers, I've not exhausted the possible textual strings that may be incorrect, and I've only looked at the 'type' attribute. I don't know if other attributes are all ok.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Components

Assignee

Reporter

Priority

Fix versions

Affects versions

Created December 17, 2018 at 10:51 AM
Updated January 2, 2019 at 10:54 AM
Resolved January 2, 2019 at 10:54 AM