Titan Core Initial Contribution
[deliverable/titan.core.git] / regression_test / XML / XmlWorkflow / XmlTest_xsds / ETSI_CR5852_union.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright (c) 2000-2014 Ericsson Telecom AB
4
5 All rights reserved. This program and the accompanying materials
6 are made available under the terms of the Eclipse Public License v1.0
7 which accompanies this distribution, and is available at
8 http://www.eclipse.org/legal/epl-v10.html
9 -->
10 <schema targetNamespace="ETSI_CR5852_union"
11 xmlns:etsiu="ETSI_CR5852_union"
12 xmlns="http://www.w3.org/2001/XMLSchema"
13 >
14
15
16 <!-- EXAMPLE 5: Mapping of children of choice components
17 // Are translated to TTCN-3 as:
18 type record ChoiceChildMinMax {
19 union {
20 record length(1 .. 5) of XSD.String elem0_list,
21 // child of choice with minOccurs different from 0
22 record length(0 .. 1) of XSD.String elem1_list,
23 // first child of choice with minOccurs 0;
24 // this alternative is to be used create an empty choice element
25 record length(1) of XSD.String elem2_list,
26 // second child of choice with minOccurs 0
27 record length(1 .. infinity) of XSD.String elem3_list
28 // third child of choice with minOccurs 0
29 } choice
30 }
31 with {
32 variant "element";
33 variant (choice) "untagged";
34 variant (choice.elem0_list) "untagged";
35 variant (choice.elem0_list[-]) "name as 'elem0'";
36 variant (choice.elem1_list) "untagged";
37 variant (choice.elem1_list[-]) "name as 'elem1'";
38 variant (choice.elem2_list) "untagged";
39 variant (choice.elem2_list[-]) "name as 'elem2'";
40 variant (choice.elem3_list) "untagged";
41 variant (choice.elem3_list[-]) "name as 'elem3'";
42 };
43 -->
44 <element name="ChoiceChildMinMax">
45 <complexType>
46 <choice>
47 <element name="elem0" type="string" minOccurs="1" maxOccurs="5"/>
48 <element name="elem1" type="string" minOccurs="0" />
49 <element name="elem2" type="string" minOccurs="0" />
50 <element name="elem3" type="string" minOccurs="0" maxOccurs="unbounded"/>
51 </choice>
52 </complexType>
53 </element>
54
55 <!-- added only to enable showing all cases in one XML instance -->
56 <element name="minOccurs_maxOccurs_frame">
57 <complexType>
58 <choice minOccurs="0" maxOccurs="unbounded">
59 <element ref="etsiu:ChoiceChildMinMax"/>
60 </choice>
61 </complexType>
62 </element>
63
64
65
66 </schema>
67
This page took 0.043461 seconds and 5 git commands to generate.