Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: XSD2TTCN-3: How to map an element with empty complexType

XSD2TTCN-3: How to map an element with empty complexType 07 Jun 2011 09:08 #7748

Hello,

Can anybody give us a hint how the XSD element shown below has to be converted according to Part 9 (XSD to TTCN Mapping):
<!-- emergency element for //ims-3gpp//alternative-service//type -->
   <xs:element name="emergency">
      <xs:complexType/>
   </xs:element>
see File IMS3gpp.xsd, in the latest RAN5 Delivery iWD-EUTRA-B2011-03_D11wk23

We could not find any rule in Part 9 of the standard, that covers the mapping of an empty complexType.
With best regards,

Thilo Lauer
Last Edit: 11 Feb 2014 13:11 by Denis Filatov.
The administrator has disabled public write access.

XSD2TTCN-3: How to map an element with empty complexType 07 Jun 2011 10:43 #7749

I think this must be mapped to an empty record type.

Since every element is mapped to a record type which contains the fields
representing the attributes and the content of the element and since the
empty complexType pretty much describes the empty content with no
attributes, this will yield the empty record type.

BR, Jacob
Last Edit: 11 Feb 2014 13:11 by Denis Filatov.
The administrator has disabled public write access.

XSD2TTCN-3: How to map an element with empty complexType 08 Jun 2011 15:41 #7751

Hi,

correct. The complexType itself is always mapped to a record on its own, independent of the content. And than the content is mapped fields of this record:

type record Emergency
{
}
with {
    variant "name as uncapitalized";
    variant "element";
};
BR, Gyorgy
Last Edit: 11 Feb 2014 13:12 by Denis Filatov.
The administrator has disabled public write access.

XSD2TTCN-3: How to map an element with empty complexType 16 Jun 2011 13:29 #7753

Hi Gyorgy & Jacob

Thanks for your answers. That's OK so far for us.

But what about
<xs:element name="dummy1">
</xs:element>
or
<xs:element name="dummy2" />
or
<xs:element />
or
<xs:attribute name="attrWithoutType"/>
or
<xs:attribute name="attrEmptySimpleType">
    <xs:simpleType/>
</xs:attribute>
... and there are surely a lot more examples of syntactically correct XSD items that miss currently a meaningful mapping to TTCN-3.

How should they be handled?

With best regards,
Thilo Lauer
Last Edit: 11 Feb 2014 13:14 by Denis Filatov.
The administrator has disabled public write access.

XSD2TTCN-3: How to map an element with empty complexType 17 Jun 2011 14:00 #7754

<xs:elementname="dummy1"/>
</xs:element>
empty record
<xs:elementname="dummy2" />
empty record
<xs:element />
makes no sense, all elements need a name
<xs:attributename="attrWithoutType"/>
string
<xs:attributename="attrEmptySimpleType"/>
<xs:simpleType/>
</xs:attribute>
string

BR, Jacob Wieland
Last Edit: 11 Feb 2014 13:21 by Denis Filatov.
The administrator has disabled public write access.

XSD2TTCN-3: How to map an element with empty complexType 19 Jun 2011 13:33 #7755

Hi Thilo,

actually, it is not sufficient if an XSD spec. is syntactically correct, it shall also be valid to translate it to TTCN-3.

But what about
<xs:element name="dummy1">
</xs:element>
the default type of XSD elements is anyType, see the XSD spec. Part-1 $3.3.2:
{type definition}<www.w3.org/TR/2004/REC-xmlschema-1-20041...html#type_definition> The type definition corresponding to the <simpleType><www.w3.org/TR/2004/REC-xmlschema-1-20041...l#element-simpleType> or <complexType><www.w3.org/TR/2004/REC-xmlschema-1-20041...#element-complexType> element information item in the [children]<www.w3.org/TR/xml-infoset/#infoitem.element>, if either is present, otherwise the type definition ·resolved·<www.w3.org/TR/2004/REC-xmlschema-1-20041...res.html#src-resolve> to by the ·actual value·<www.w3.org/TR/2004/REC-xmlschema-1-20041...ructures.html#key-vv> of the type [attribute]<www.w3.org/TR/xml-infoset/#infoitem.element>, otherwise the {type definition}<www.w3.org/TR/2004/REC-xmlschema-1-20041...html#type_definition> of the element declaration ·resolved·<www.w3.org/TR/2004/REC-xmlschema-1-20041...res.html#src-resolve> to by the ·actual value·<www.w3.org/TR/2004/REC-xmlschema-1-20041...ructures.html#key-vv> of the substitutionGroup [attribute]<www.w3.org/TR/xml-infoset/#infoitem.element>, if present, otherwise the ·ur-type definition·<www.w3.org/TR/2004/REC-xmlschema-1-20041....html#ur-type-itself>
.
"
Hence it shall be translated to XSD.AnyType. Currently this case is not handled in Part-9 $7.3, could you submit a CR for this case pls.?

or
<xs:element name="dummy2" />
This is the same as element dummy1 just using the short syntax.

or
<xs:element />
is invalid, the name or the ref attribute (but not both) shall be present in elements, see XSD spec Part-1 $ 3.3.3 item 2.1.

or
<xs:attribute name="attrWithoutType"/>
the default type of XSD attributes is anySimpleType, see the XSD spec. Part-1 $3.2.2: "
{type definition}<www.w3.org/TR/2004/REC-xmlschema-1-20041...mple_type_definition> The simple type definition corresponding to the <simpleType><www.w3.org/TR/2004/REC-xmlschema-1-20041...l#element-simpleType> element information item in the [children]<www.w3.org/TR/xml-infoset/#infoitem.element>, if present, otherwise the simple type definition ·resolved·<www.w3.org/TR/2004/REC-xmlschema-1-20041...res.html#src-resolve> to by the ·actual value·<www.w3.org/TR/2004/REC-xmlschema-1-20041...ructures.html#key-vv> of the type [attribute]<www.w3.org/TR/xml-infoset/#infoitem.element>, if present, otherwise the ·simple ur-type definition·<www.w3.org/TR/2004/REC-xmlschema-1-20041...imple-ur-type-itself>.
"
Hence it shall be translated to XSD.AnySimpleType. Currently this case is not handled in Part-9 $7.4.1, could you submit a CR for this case pls.?

or
<xs:attribute name="attrEmptySimpleType">
    <xs:simpleType/>
</xs:attribute>
is invalid, a <simpleType> shall have one of the childrens <restriction>, <union> or <list>.

BR, Gyorgy
Last Edit: 11 Feb 2014 13:30 by Denis Filatov.
The administrator has disabled public write access.

XSD2TTCN-3: How to map an element with empty complexType 20 Jun 2011 12:10 #7756

Hi György

The CRs are issued:

CR 5904 : <xs:element name="dummy1"></xs:element>

CR 5905 : <xs:attribute name="attrWithoutType"/>

With best regards,

Thilo Lauer
Last Edit: 11 Feb 2014 13:31 by Denis Filatov.
The administrator has disabled public write access.

XSD2TTCN-3: How to map an element with empty complexType 20 Jun 2011 14:09 #7757

Hi Thilo,

thans.

BR, Gyorgy
Last Edit: 11 Feb 2014 13:01 by Denis Filatov.
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin