Hi all,
I have some naming questions regarding XSD2TTCN conversion standard (part 9, ed. 4.4.1):
See highlighted content below:
Section 7.6.8: Mixed content
EXAMPLE 1: Complex type definition with sequence constructor and mixed content type:
<element name="MySeqMixed">
<xsd:complexType name="MyComplexType-12" mixed="true">
...
</xsd:complexType>
</element>
Is translated to the TTCN-3 type definition
type record MySeqMixedMyComplexType_12 {
...
}
with { ... }
And the template
template MySeqMixedMyComplexType_12 t_MySeqMixedMyComplexType_12 := {
embed_values:= {"The ordered", "has arrived", "Wait for further information."},
a:= "car",
b:= true
}
will be encoded as
<MySeqMixedMyComplexType-12>
...
</MySeqMixedMyComplexType-12>
Question 1 regarding Example 1:
Where is this name concatenation rule (MySeqMixedMyComplexType_12) specified?
Or should this instead be translated to:
type record MyComplexType_12 {
...
}
with {
variant "name as 'MySeqMixed'";
}
EXAMPLE 2: Complex type definition with sequence constructor of multiple occurrences and mixed content
type:
<element name="MyComplexElem-16">
<xsd:complexType name="MyComplexType-16" mixed="true">
...
</xsd:complexType>
</element>
Is translated to the TTCN-3 type definition
type record MyComplexTypeElem_16 {
...
}
with {
variant "name as 'MyComplexElem-16'";
variant "element"
variant "embedValues"
}
And the template
template MyComplexTypeElem_16 t_MyComplexTypeElem_16 := {
...
}
will be encoded as
<MyComplexTypeElem_16>
...
</MyComplexTypeElem_16>
Question 2 regarding Example 2: (same issue for Example 3)
Where is this name conversion rule (MyComplexElem-16 MyComplexType-16 converted to MyComplexTypeElem_16) specified?
Or should this instead be translated to:
type record MyComplexType_16 {
...
}
with {
variant "name as 'MyComplexElem-16'";
}
Question 3:
If both, the element and/or the complexType have a name, which one shall be taken?
Question 4:
What about nested, non-global complexType definitions with mixed="true" and name="..."?
<element name="MyComplexElem-77">
<xsd:complexType name="MyComplexType-77" mixed="true">
...
<xsd:complexType name="MyNestedComplexType-99" mixed="true">
...
</xsd:complexType>
...
</xsd:complexType>
</element>
Is translated to the TTCN-3 type definition
type record MyComplexType_77 {
...
record { // MyNestedComplexType_99 cannot be used here, therefore it has to be ignored - right?
...
}
...
}
with {
variant "name as 'MyComplexElem-77'";
}
Many thanks for any response.
Regards,
Thilo Lauer