Incorrect order in TTCN-3 record generated by xsd2ttcn
Submitted by Elemer Lelik
Link to original bug (#562102)
Description
Created attachment 282436 Schema files
The TTCN-3 file generated based on the attached schemas (urn_ietf_params_xml_ns_xcap_diff.ttcn) contain an incorrect order for the record DocumentType:
type record DocumentType
{
XSD.String new_etag optional,
XSD.String previous_etag optional,
XSD.AnyURI sel,
record of XSD.String attr optional,
union {
EmptyType body_not_changed,
record of record {
union {
record {
Pos pos optional,
Xpath_add sel,
Type type_ optional,
record of XSD.String attr optional,
record of XSD.String embed_values_1,
record of XSD.String elem_list
} add,
record {
Xpath sel,
Ws ws optional,
record of XSD.String attr optional
} remove,
record {
Xpath sel,
record of XSD.String attr optional,
record of XSD.String embed_values_1,
XSD.String elem optional
} replace_,
XSD.String elem
} choice
} sequence_list
} choice optional
}
:
as revealed by the compilation error:
make
/home/james00/titan.core/Install/bin/compiler -L
urn_ietf_params_xml_ns_xcap_diff.ttcn UsefulTtcn3Types.ttcn XSD.ttcn - urn_ietf_params_xml_ns_xcap_diff.ttcn UsefulTtcn3Types.ttcn XSD.ttcn
Notify: Parsing TTCN-3 module urn_ietf_params_xml_ns_xcap_diff.ttcn'... Notify: Parsing TTCN-3 module
UsefulTtcn3Types.ttcn'...
Notify: Parsing TTCN-3 module XSD.ttcn'... Notify: Checking modules... urn_ietf_params_xml_ns_xcap_diff.ttcn: In TTCN-3 module
urn_ietf_params_xml_ns_xcap_diff':
urn_ietf_params_xml_ns_xcap_diff.ttcn:140.1-154.1: In type definition Xcap_diff': urn_ietf_params_xml_ns_xcap_diff.ttcn:144.2-153.20: In record field
sequence':
urn_ietf_params_xml_ns_xcap_diff.ttcn:145.3-151.17: In record field sequence_list': urn_ietf_params_xml_ns_xcap_diff.ttcn:145.3-151.3: In embedded type of record of: urn_ietf_params_xml_ns_xcap_diff.ttcn:146.4-150.11: In record field
choice':
urn_ietf_params_xml_ns_xcap_diff.ttcn:147.5-25: In union field document': urn_ietf_params_xml_ns_xcap_diff.ttcn:173.1-206.1: In type definition
DocumentType':
urn_ietf_params_xml_ns_xcap_diff.ttcn:183.5-190.5: error: A type with EMBED-VALUES must be a sequence type. The first component of the sequence shall be SEQUENCE OF UTF8String and shall not be marked DEFAULT
urn_ietf_params_xml_ns_xcap_diff.ttcn:196.5-201.5: error: A type with EMBED-VALUES must be a sequence type. The first component of the sequence shall be SEQUENCE OF UTF8String and shall not be marked DEFAULT
the correct order being:
type record DocumentType { XSD.String new_etag optional, XSD.String previous_etag optional, XSD.AnyURI sel, record of XSD.String attr optional, union { EmptyType body_not_changed, record of record { union { record { record of XSD.String embed_values_1,//has to be first!!!! Pos pos optional, Xpath_add sel, Type type_ optional, record of XSD.String attr optional,
record of XSD.String elem_list
} add,
record {
Xpath sel,
Ws ws optional,
record of XSD.String attr optional
} remove,
record {
record of XSD.String embed_values_1, //has to be first!!!
Xpath sel,
record of XSD.String attr optional,
XSD.String elem optional
} replace_,
XSD.String elem
} choice
} sequence_list
} choice optional
} :
Attachment 282436, "Schema files":
XSD.zip
Version: 6.6.1