You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.
This page lists the behaviour of the Runtime when creating or parsing XML messages based on XSD schemas (SOAP and REST with schema sets).
The behaviour is broken down by:
- whether the message is being sent or being received
- whether attributes and relations are inside a sequence or a choice
- whether an element is mapped to an attribute or a relation
- whether the attribute or relation is single-valued or multi-valued
1. Sending an XML message
TBD
1.1 Sequences
TBD
1.1.1 Single-Valued Attributes
Value | Source | minOccurs | nillable | Result |
---|---|---|---|---|
unknown | system | 0 | * | element not present |
unknown | system | > 0 | * | error |
unknown | user | 0 | false | empty element |
unknown | user | 0 | true | nil element |
unknown | user | 1 | false | empty element |
unknown | user | 1 | true | nil element |
unknown | user | > 1 | false | as many empty elements as required by minOccurs |
unknown | user | > 1 | true | as many nil elements as required by minOccurs |
known | * | * | * | an element containing the value |
1.1.2 Multi-Valued Attributes
Value | Source | minOccurs | nillable | Result |
---|---|---|---|---|
unknown | system | 0 | * | no elements present |
unknown | system | > 0 | * | error |
unknown | user | 0 | false | empty element |
unknown | user | 0 | true | nil element |
unknown | user | > 0 | false | as many empty elements as required by minOccurs |
unknown | user | > 0 | true | as many nil elements as required by minOccurs |
known, count < minOccurs | * | * | false | count elements with values, padded with empty elements as required by minOccurs |
known, count < minOccurs | * | * | true | count elements with values, padded with nil elements as required by minOccurs |
known, minOccurs <= count <= maxOccurs | * | * | * | as many elements as there are values, each element containing the corresponding value |
known, maxOccurs < count | * | * | * | error |
1.1.3 Single-Valued Relations
The source of relations is not used when handing unknown relations. Empty or nil tags are never created for relations, as that would lead to extra, unwanted instances on the receiving side.
Value | minOccurs | nillable | Result |
---|---|---|---|
unknown | 0 | * | element not present |
unknown | > 0 | * | error |
known, attributes and relations do not generate sub-elements | * | false | empty element |
known, attributes and relations do not generate sub-elements | * | true | nil element |
known, at least one attribute or relation generates a sub-element | * | * | an element with sub-elements according to the rules on this page |
1.1.4 Multi-Valued Relations
TBD
Value | minOccurs | nillable | Result |
---|---|---|---|
unknown | 0 | * | no elements present |
unknown | > 0 | * | error |
known, count < minOccurs | * | * | error |
known, minOccurs <= count <= maxOccurs | * | false | count elements |
known, minOccurs <= count <= maxOccurs | * | true | count elements. If any of the instances do not generate sub-elements, the element corresponding to that instance is nil |
known, maxOccurs < count | * | * | error |
1.2 Choices
The behaviour of choices depends on the min/maxOccurs on the choice, the min/maxOccurs of the elements inside the choice, as well as the value and source of the attributes or relations mapped to those elements.
It is possible to choose multiple times, as required by minOccurs and restricted by maxOccurs on the choice. When choosing a second time, the same element that was chosen on the first choice cannot be chosen again (Petru Galanton : there is a contradiction to this in the single-valued attributes table, see below - in reality an element can be chosen multiple times if it has minOccurs = 0, in that case it chosen 0 times).
Other rules:
- System-set attributes are never chosen.
- Unknown relations are never chosen (source doesn't matter)
1.2.1 Single-Valued Attributes
TBD
Petru Galanton : would it be more clear if we had only the following combinations ?
- unknown/system with all of unknown/system, unknown/user, known
- unknown/user with unknown/user and known (so leave out unknown/user + unknown/system, as that was covered already by unknown/system + unknown/user)
- known with known (so leave out known + unknown/system and known + unknown/user, as those were covered already by unknown/system + known and unknown/user + known)
TODO Petru Galanton : clarify that in the table below minOccurs is abbreviated to "min" due to lack of space.
Choice minOccurs | Element A | Element B | Result | Explanation | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Value | Source | min | nillable | Value | Source | min | nillable | |||
0 | unknown | system | * | * | unknown | system | * | * | no element is present | chosen 0 times, or chosen element A 0 times, or chosen element B 0 times |
0 | unknown | system | * | * | unknown | user | 0 | false | <B/> | chosen element B 1 time |
0 | unknown | system | * | * | unknown | user | 0 | true | <B xsi:nil="true"/> | chosen element B 1 time |
0 | unknown | system | * | * | unknown | user | 1 | false | <B/> | chosen element B 1 time |
0 | unknown | system | * | * | unknown | user | 1 | true | <B xsi:nil="true"/> | chosen element B 1 time |
0 | unknown | system | * | * | unknown | user | > 1 | false | <B /> <B/> | chosen as many empty B elements as required by element B minOccurs, chosen 1 time |
0 | unknown | system | * | * | unknown | user | > 1 | true | <B xsi:nil="true"/> <B xsi:nil="true"/> | chosen as many nil B elements as required by element B minOccurs, chosen 1 time |
0 | unknown | system | * | * | known | <= 1 | * | * | <B>value</B> | |
0 | unknown | system | * | * | known | > 1 | * | false | <B>value</B> <B/> | chosen 1 B element and padded with as many empty elements as required by minOccurs of element B, chosen 1 time |
0 | unknown | system | * | * | known | > 1 | * | true | <B>value</B> <B xsi:nil="true"/> | chosen 1 B element and padded with as many nil elements as required by minOccurs of element B, chosen 1 time |
0 | unknown | user | 0 | false | unknown | system | * | * | <A> | chosen element A 1 time |
0 | unknown | user | 0 | true | unknown | system | * | * | <A xsi:nil="true"/> | chosen element A 1 time |
0 | unknown | user | 1 | false | unknown | system | * | * | <A> | chosen element A 1 time |
0 | unknown | user | 1 | true | unknown | system | * | * | <A xsi:nil="true"/> | chosen element A 1 time |
0 | unknown | user | > 1 | false | unknown | system | * | * | <A>value</A> <A/> | chosen 1 A element and padded with as many empty elements as required by minOccurs of element A, chosen 1 time |
0 | unknown | user | > 1 | true | unknown | system | * | * | <A>value</A> <A xsi:nil="true"/> | chosen 1 A element and padded with as many nil elements as required by minOccurs of element A, chosen 1 time |
0 | unknown | user | * | * | unknown | user | * | * | error | |
0 | unknown | user | * | * | known | * | * | * | error | |
0 | known | * | * | * | unknown | system | * | * | <A>value</A> | chosen 1 A element 1 time |
0 | known | * | * | * | unknown | user | * | * | error | |
0 | known | * | * | * | known | * | * | * | error | |
1 | unknown | system | 0 | * | unknown | system | 0 | * | no element is present | chosen element A 0 times, or chosen element B 0 times |
1 | unknown | system | 0 | * | unknown | system | > 0 | * | no element is present | chosen element A 0 times |
1 | unknown | system | 0 | * | unknown | user | <= 1 | false | <B /> | chosen element B 1 time |
1 | unknown | system | 0 | * | unknown | user | <= 1 | true | <B xsi:nil="true"/> | chosen element B 1 time |
1 | unknown | system | 0 | * | unknown | user | > 1 | false | <B/> <B/> | chosen element B 1 time, padded with as many empty elements as required by minOccurs of element B |
1 | unknown | system | 0 | * | unknown | user | > 1 | true | <B xsi:nil="true" /> <B xsi:nil="true" /> | chosen element B 1 time, padded with as many nil elements as required by minOccurs of element B |
1 | unknown | system | 0 | * | known | * | <= 1 | * | <B>value</B> | chosen element B 1 time |
1 | unknown | system | 0 | * | known | * | > 1 | false | <B>value</B> <B /> | chosen element B 1 time, padded with as many empty elements as required by minOccurs of element B |
1 | unknown | system | 0 | * | known | * | > 1 | true | <B>value</B> <B xsi:nil="true" /> | chosen element B 1 time, padded with as many nil element as required by minOccurs of element B |
1 | unknown | system | > 0 | * | unknown | system | 0 | * | no element is present | chosen element B 0 times |
1 | unknown | system | > 0 | * | unknown | system | > 0 | * | error | no element could be chosen |
1 | unknown | system | > 0 | * | unknown | user | <= 1 | false | <B/> | chosen element B 1 time |
1 | unknown | system | > 0 | * | unknown | user | <= 1 | true | <B xsi:nil="true"/> | chosen element B 1 time |
1 | unknown | system | > 0 | * | unknown | user | > 1 | false | <B /> <B /> | chosen element B 1 time, padded with as many empty elements as required by minOccurs of element B |
1 | unknown | system | > 0 | * | unknown | user | > 1 | true | <B xsi:nil="true" /> <B xsi:nil="true" /> | chosen element B 1 time, padded with as many empty elements as required by minOccurs of element B |
1 | unknown | system | > 0 | * | known | * | <= 1 | * | <B>value</B> | chosen element B 1 time |
1 | unknown | system | > 0 | * | known | * | > 1 | false | <B>value<B> <B /> | chosen element B 1 time, padded with as many empty elements as required by minOccurs of element B |
1 | unknown | system | > 0 | * | known | * | > 1 | true | <B>value</B> <B xsi:nil="true"/> | chosen element B 1 time, padded with as many nil elements as required by minOccurs of element B |
1 | unknown | user | <= 1 | false | unknown | system | * | * | <A/> | chosen element A 1 time |
1 | unknown | user | <= 1 | true | unknown | system | * | * | <A xsi:nil="true" /> | chosen element A 1 time |
1 | unknown | user | > 1 | false | unknown | system | * | * | <A/> <A/> | chosen element A 1 time, padded with as many empty elements as required by minOccurs of element A |
1 | unknown | user | > 1 | true | unknown | system | * | * | <A xsi:nil="true" /> <A xsi:nil="true" /> | chosen element A 1 time, padded with as many nil elements as required by minOccurs of element A |
1 | unknown | user | * | * | unknown | user | * | * | error | |
1 | unknown | user | * | * | known | * | * | * | error | |
1 | known | * | <= 1 | * | unknown | system | * | * | <A>value</A> | |
1 | known | * | > 1 | false | unknown | system | * | * | <A>value</A> <A/> | chosen element A 1 time, padded with as many empty elements as required by minOccurs of element A |
1 | known | * | > 1 | true | unknown | system | * | * | <A>value</A> <A xsi:nil="true" /> | chosen element A 1 time, padded with as many nil elements as required by minOccurs of element A |
1 | known | * | * | * | unknown | user | * | * | error | |
1 | known | * | * | * | known | * | * | * | error | |
> 1 | unknown | system | 0 | * | unknown | system | 0 | * | no element present | Chosen as many times as required by minOccurs of choice. At each choice, either element A was chosen 0 times, or element B was chosen 0 times |
> 1 | unknown | system | 0 | * | unknown | system | > 1 | * | no element present | Chosen as many times as required by minOccurs of choice. At each choice, element A was chosen 0 times |
> 1 | unknown | system | 0 | * | unknown | user | <= 1 | * | <B> | Chosen as many times as required by minOccurs of choice. On the first choice, element B was chosen 1 time. On the remaining choices, element A was chosen 0 times. |
> 1 | unknown | system | 0 | * | unknown | user | > 1 | false | <B> <B> | Chosen as many times as required by minOccurs of choice. On the first choice, element B was chosen as many times as required by minOccurs of element B. On the remaining choices, element A was chosen 0 times |
> 1 | unknown | system | 0 | * | unknown | user | > 1 | true | <B xsi:nil="true" /> <B xsi:nil="true" /> | Chosen as many times as required by minOccurs of choice. On the first choice, element B was chosen as many times as required by minOccurs of element B. On the remaining choices, element A was chosen 0 times |
> 1 | unknown | system | 0 | * | known | * | <= 1 | * | <B>value</B> | Chosen as many times as required by minOccurs of choice. On the first choice, element B was chosen. On the remaining choices, element A was chosen 0 times |
> 1 | unknown | system | 0 | * | known | * | > 1 | false | <B>value</B> <B/> | Chosen as many times as required by minOccurs of choice. On the first choice, element B was chosen, padded with as many empty elements as required by minOccurs of element B On the remaining choices, element A was chosen 0 times |
> 1 | unknown | system | 0 | * | known | * | > 1 | true | <B>value</B> <B xsi:nil="true"/> | Chosen as many times as required by minOccurs of choice. On the first choice, element B was chosen, padded with as many nill elements as required by minOccurs of element B On the remaining choices, element A was chosen 0 times |
> 1 | unknown | system | > 0 | * | unknown | system | 0 | * | no element present | Chosen as many times as required by minOccurs of choice. On each choice, element B was chosen 0 times |
> 1 | unknown | system | > 0 | * | unknown | system | > 0 | * | error | no element could be chosen |
> 1 | unknown | system | > 0 | * | unknown | user | 0 | false | <B> | Chosen as many times as required by minOccurs of choice On the first choice, element B was chosen 1 time On the remaining choices, element B was chosen 0 times |
> 1 | unknown | system | > 0 | * | unknown | user | 0 | true | <B xsi:nil="true"/> | Chosen as many times as required by minOccurs of choice On the first choice, element B was chosen 1 time. On the remaining choices, element B was chosen 0 times. |
> 1 | unknown | system | > 0 | * | unknown | user | > 0 | * | error | Chosen as many times as required by minOccurs of choice On the first choice, element B was chosen as many times as required by minOccurs of element B On the remaining choices, no other element could be chosen |
> 1 | unknown | system | > 0 | * | known | * | 0 | * | <B>value</B> | Chosen as many times as required by minOccurs of choice. On the first choice, element B was chosen 1 time. On the remaining choices, element B was chosen 0 times (Petru Galanton : this is in contradiction with the statement that the same element cannot be chosen twice) |
> 1 | unknown | system | > 0 | * | known | * | > 0 | * | error | Chosen as many times as required by minOccurs of choice On the first choice, element B was chosen as many times as required by minOccurs of element B On the remaining choices, no other element could be chosen |
> 1 | unknown | user | 0 | false | unknown | system | 0 | * | <A> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | unknown | user | 0 | false | unknown | system | > 0 | * | <A> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the remaining choices, element A was chosen 0 times |
> 1 | unknown | user | 0 | false | unknown | user | <= 1 | false | <A> <B> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen 1 time On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | unknown | user | 0 | false | unknown | user | <= 1 | true | <A> <B xsi:nil="true" /> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen 1 time On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | unknown | user | 0 | false | unknown | user | > 1 | false | <A> <B> <B> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen as many times as required by minOccurs of element B On the remaining choices, element A was chosen 0 times |
> 1 | unknown | user | 0 | false | unknown | user | > 1 | true | <A> <B xsi:nil="true"/> <B xsi:nil="true"/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen as many times as required by minOccurs of element B On the remaining choices, element A was chosen 0 times |
> 1 | unknown | user | 0 | false | known | * | <= 1 | * | <A> <B>value</A> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen as many times as required by minOccurs of element B On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | unknown | user | 0 | false | known | * | > 1 | false | <A> <B>value</B> <B/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen, padded with empty elements as required by minOccurs of element B On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | unknown | user | 0 | false | known | * | > 1 | true | <A> <B>value</B> <B xsi:nil="true"/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen, padded with nil elements as required by minOccurs of element B On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | unknown | user | 0 | true | unknown | system | 0 | * | <A xsi:nil="true"/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | unknown | user | 0 | true | unknown | system | > 0 | * | <A xsi:nil="true"/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the remaining choices, element A was chosen 0 times |
> 1 | unknown | user | 0 | true | unknown | user | <= 1 | false | <A xsi:nil="true"> <B> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen 1 time On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | unknown | user | 0 | true | unknown | user | <= 1 | true | <A xsi:nil="true"/> <B xsi:nil="true" /> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen 1 time On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | unknown | user | 0 | true | unknown | user | > 1 | false | <A xsi:nil="true"/> <B> <B> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen as many times as required by minOccurs of element B On the remaining choices, element A was chosen 0 times |
> 1 | unknown | user | 0 | true | unknown | user | > 1 | true | <A xsi:nil="true"/> <B xsi:nil="true"/> <B xsi:nil="true"/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen as many times as required by minOccurs of element B On the remaining choices, element A was chosen 0 times |
> 1 | unknown | user | 0 | true | known | * | <= 1 | * | <A xsi:nil="true"/> <B>value</A> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen as many times as required by minOccurs of element B On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | unknown | user | 0 | true | known | * | > 1 | false | <A xsi:nil="true"/> <B>value</B> <B/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen, padded with empty elements as required by minOccurs of element B On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | unknown | user | 0 | true | known | * | > 1 | true | <A xsi:nil="true"/> <B>value</B> <B xsi:nil="true"/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice element B was chosen, padded with nil elements as required by minOccurs of element B On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | unknown | user | > 0 | false | unknown | system | 0 | * | <A/> <A/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the remaining choices, element B was chosen 0 times |
> 1 | unknown | user | > 0 | false | unknown | system | > 0 | * | error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen as many times as required by minOccurs of element A On the remaining choices, no other element could be chosen |
> 1 | unknown | user | > 0 | false | unknown | user | 0 | * | <A/> <A/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the remaining choices, element B was chosen 0 times |
> 1 | unknown | user | > 0 | false | unknown | user | > 0 | false | <A/> <A/> <B/> <B/> or error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the second choice, element B was chosen, padded with empty elements as required by minOccurs of element B If choice minOccurs > 2, then it is an error, as there is no 3rd element that could be chosen |
> 1 | unknown | user | > 0 | false | unknown | user | > 0 | true | <A/> <A/> <B xsi:nil="true"/> <B xsi:nil="true"/> or error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the second choice, element B was chosen, padded with nil elements as required by minOccurs of element B If choice minOccurs > 2, then it is an error, as there is no 3rd element that could be chosen |
> 1 | unknown | user | > 0 | false | known | * | 0 | * | <A/> <A/> <B>value</B> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the second choice, element B was chosen 1 time On the remaining choices, element B was chosen 0 times |
> 1 | unknown | user | > 0 | false | known | * | > 0 | false | <A/> <A/> <B>value</B> <B/> or error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the second choice, element B was chosen, padded with empty elements as required by minOccurs of element B If choice minOccurs > 2, then it is an error, as there is no 3rd element that could be chosen |
> 1 | unknown | user | > 0 | false | known | * | > 0 | true | <A/> <A/> <B>value</B> <B xsi:nil="true"/> or error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the second choice, element B was chosen, padded with nil elements as required by minOccurs of element B If choice minOccurs > 2, then it is an error, as there is no 3rd element that could be chosen |
> 1 | known | * | 0 | * | unknown | system | 0 | * | <A>value</A> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | known | * | 0 | * | unknown | system | > 0 | * | <A>value</A> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the remaining choices, element A was chosen 0 times |
> 1 | known | * | 0 | * | known | * | 0 | * | <A>value</A> <B>value</A> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice, element B was chosen 1 time On the remaining choices, element A was chosen 0 times or element B was chosen 0 times |
> 1 | known | * | 0 | * | known | * | > 0 | false | <A>value</A> <B>value</B> <B/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice, element B was chosen, padded with empty elements as required by minOccurs of element B On the remaining choices, element A was chosen 0 times |
> 1 | known | * | 0 | * | known | * | > 0 | true | <A>value</A> <B>value</B> <B xsi:nil="true"/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen 1 time On the second choice, element B was chosen, padded with nil elements as required by minOccurs of element B On the remaining choices, element A was chosen 0 times |
> 1 | known | * | > 0 | false | unknown | system | 0 | * | <A>value</A> <A/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty element as required by minOccurs of element A On the remaining choices, element B was chosen 0 times |
> 1 | known | * | > 0 | false | unknown | system | > 0 | * | error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty element as required by minOccurs of element A On the remaining choices, no other element could be chosen |
> 1 | known | * | > 0 | false | unknown | user | 0 | false | <A>value</A> <A/> <B/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the second choice, element B was chosen 1 time On the remaining choices, element B was chosen 0 times |
> 1 | known | * | > 0 | false | unknown | user | 0 | true | <A>value</A> <A/> <B xsi:nil="true"/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the second choice, element B was chosen 1 time On the remaining choices, element B was chosen 0 times |
> 1 | known | * | > 0 | false | unknown | user | > 0 | false | <A>value</A> <A/> <B/> <B/> or error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the second choice, element B was chosen, padded with empty elements as required by minOccurs of element B If choice minOccurs > 2, then error as no 3rd element could be chosen |
> 1 | known | * | > 0 | false | unknown | user | > 0 | true | <A>value</A> <A/> <B xsi:nil="true"/> <B xsi:nil="true"/> or error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the second choice, element B was chosen, padded with nil elements as required by minOccurs of element B If choice minOccurs > 2, then error as no 3rd element could be chosen |
> 1 | known | * | > 0 | false | known | * | 0 | * | <A>value</A> <A/> <B>value</B> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the second choice, element B was chosen 1 time On the remaining choices, element B was chosen 0 times |
> 1 | known | * | > 0 | false | known | * | > 0 | false | <A>value</A> <A/> <B>value</B> <B/> or error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the second choice, element B was chosen, padded with empty elements as required by minOccurs of element B If choice minOccurs > 2, then error as no 3rd element could be chosen |
> 1 | known | * | > 0 | false | known | * | > 0 | true | <A>value</A> <A/> <B>value</B> <B xsi:nil="true"/> or error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with empty elements as required by minOccurs of element A On the second choice, element B was chosen, padded with nil elements as required by minOccurs of element B If choice minOccurs > 2, then error as no 3rd element could be chosen |
> 1 | known | * | > 0 | true | unknown | system | 0 | * | <A>value</A> <A xsi:nil="true"/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with nil elements as required by minOccurs of element A On the remaining choices, element B was chosen 0 times |
> 1 | known | * | > 0 | true | unknown | system | > 0 | * | error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with nil elements as required by minOccurs of element A On the remaining choices, no other element could be chosen |
> 1 | known | * | > 0 | true | unknown | user | 0 | false | <A>value</A> <A xsi:nil="true"/> <B/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with nil elements as required by minOccurs of element A On the second choice, element B was chosen 1 time On the remaining choices, element B was chosen 0 times |
> 1 | known | * | > 0 | true | unknown | user | 0 | true | <A>value</A> <A xsi:nil="true"/> <B xsi:nil="true"/> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with nil elements as required by minOccurs of element A On the second choice, element B was chosen 1 time On the remaining choices, element B was chosen 0 times |
> 1 | known | * | > 0 | true | unknown | user | > 0 | false | <A>value</A> <A xsi:nil="true"/> <B/> <B/> or error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with nil elements as required by minOccurs of element A On the second choice, element B was chosen, padded with empty elements as required by minOccurs of element B If choice minOccurs > 2, then error as no 3rd element could be chosen |
> 1 | known | * | > 0 | true | unknown | user | > 0 | true | <A>value</A> <A xsi:nil="true"/> <B xsi:nil="true"/> <B xsi:nil="true"/> or error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with nil elements as required by minOccurs of element A On the second choice, element B was chosen, padded with nil elements as required by minOccurs of element B If choice minOccurs > 2, then error as no 3rd element could be chosen |
> 1 | known | * | > 0 | true | known | * | 0 | * | <A>value</A> <A xsi:nil="true"/> <B>value</B> | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with nil elements as required by minOccurs of element A On the second choice, element B was chosen 1 time On the remaining choices, element B was chosen 0 times |
> 1 | known | * | > 0 | true | known | * | > 0 | false | <A>value</A> <A xsi:nil="true"/> <B>value</B> <B/> or error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with nil elements as required by minOccurs of element A On the second choice, element B was chosen, padded with empty elements as required by minOccurs of element B If choice minOccurs > 2, then error as no 3rd element could be chosen |
> 1 | known | * | > 0 | true | known | * | > 0 | true | <A>value</A> <A xsi:nil="true"/> <B>value</B> <B xsi:nil="true"/> or error | Chosen as many times as required by minOccurs of choice On the first choice, element A was chosen, padded with nil elements as required by minOccurs of element A On the second choice, element B was chosen, padded with nil elements as required by minOccurs of element B If choice minOccurs > 2, then error as no 3rd element could be chosen |
1.2.2 Multi-Valued Attributes
TBD
The same general rules apply for multi-valued attributes as for single-valued attributes. In addition, there can be situations where the attribute is known and the value count is :
- too low to satisfy the minOccurs requirement
- too high to satisfy the maxOccurs requirement
The following table summarizes the Runtime behaviour for a multi-valued attribute with a known value.
Value Count | nillable | Result | Explanation |
---|---|---|---|
count < minOccurs | false | <A>value 1</A> <A>value 2</A> <A/> | count elements with values, padded with empty elements as required by minOccurs |
count < minOccurs | true | <A>value 1</A> <A>value 2</A> <A xsi:nil="true"/> | count elements with values, padded with nil elements as required by minOccurs |
minOccurs <= count <= maxOccurs | * | <A>value 1</A> <A>value 2</A> | as many elements as there are values, each element containing the corresponding value |
maxOccurs < count | * | error | When a choice is made and the multi-valued attribute is chosen, all values of that attribute are chosen and must satisfy the maxOccurs requirement. If the choice has maxOccurs > 1, it is not possible to choose some of the values of the attribute on the first choice and the remaining values in another choice. |
1.2.3 Single-Valued Relations
TBD
Same as with sequences, unknown relations are never chosen, as that would result in extra instances created on the receiving side.
Same as with sequences, padding with empty or nil tags to satisfy minOccurs requirements does not apply, as that also would result in extra instances created on the receiving side.
Choice minOccurs | Choice maxOccurs | Element A | Element B | Result | Explanation | ||
---|---|---|---|---|---|---|---|
Value | minOccurs | Value | minOccurs | ||||
0 | * | unknown | * | unknown | * | no element present | chosen 0 times |
0 | * | unknown | * | known | <= 1 | <B> ... </B> | chosen element B 1 time |
0 | * | unknown | * | known | > 1 | error | chosen element B 1 time, but could not satisfy minOccurs requirement of element B |
0 | * | known | <= 1 | unknown | * | <A>...</A> | chosen element A 1 time |
0 | <= 1 | known | <= 1 | known | <= 1 | error | chosen element A 1 time and element B 1 time, but choice maxOccurs does not allow making 2 choices |
0 | > 1 | known | <= 1 | known | <= 1 | <A>...</A> <B>...</B> | chosen element A 1 time and element B 1 time |
0 | * | known | <= 1 | known | > 1 | error | chosen element A 1 time and element B 1 time, but could not satisfy minOccurs requirement of element B |
0 | * | known | > 1 | * | * | error | chosen element A 1 time, but could not satisfy minOccurs requirement of element A |
1 | unknown | 0 | unknown | 0 | |||
1 | unknown | 0 | unknown | > 0 | |||
1 | unknown | 0 | known | <= 1 | <B>...</B> | chosen element B 1 time | |
1 | unknown | 0 | known | > 1 | error | chosen element B 1 time, but could not satisfy minOccurs requirement of element B | |
unknown | > 0 | unknown | 0 | ||||
unknown | > 0 | unknown | > 0 | ||||
unknown | > 0 | known | <= 1 | ||||
unknown | > 0 | known | > 1 | ||||
1 | known | <= 1 | unknown | * | <A>...</A> | chosen element A 1 time | |
1 | <= 1 | known | <= 1 | known | <= 1 | error | chosen element A 1 time and element B 1 time, but choice maxOccurs does not allow making 2 choices |
1 | > 1 | known | <= 1 | known | <= 1 | <A>...</A> <B>...</B> | chosen element A 1 time and element B 1 time |
1 | known | <= 1 | known | > 1 | error | chosen element A 1 time and element B 1 time, but could not satisfy minOccurs requirement of element B | |
1 | known | > 1 | * | * | error | chosen element A 1 time, but could not satisfy minOccurs requirement of element A | |
2 | unknown | * | unknown | * | error | no element could be chosen, and at least 2 choices | |
2 | unknown | * | known | <= 1 | |||
2 | unknown | * | known | > 1 | |||
2 | known | <= 1 | unknown | * | |||
2 | known | <= 1 | known | <= 1 | |||
2 | known | <= 1 | known | > 1 | |||
2 | known | > 1 | unknown | * | |||
2 | known | > 1 | known | <= 1 | |||
2 | known | > 1 | known | > 1 | |||
> 2 | * | * | * | * | error | There must be at least as many elements in the choice as the choice minOccurs. |
The <A>...</A> result in the table above can be further described as depending on:
- whether element A is nillable or not
- whether any of the attributes of relations of the instance mapped to element A generate sub-elements
# | Nillable | Sub-Elements | Result | Explanation |
---|---|---|---|---|
1 | false | false | <A/> | |
2 | false | true | <A> <Sub>...</Sub> <A> | The way in which the sub-elements are expanded depends on
All the rules described on this page apply recursively to sub-elements. |
3 | true | false | <A xsi:nil="true"/> | Instead of expanding empty or nil sub-elements, the message is made smaller by setting the A element to nil. Note that if in the XSD there are sub-elements which have minOccurs > 0 then no error is thrown, as xsi:nil="true" overrides those requirements, as described in the XSD Specification |
4 | true | true | <A> <Sub>...</Sub> </A> | The explanation for #2 applies for #4 as well. |
1.2.4 Multi-Valued Relations
TBD
2. Receiving an XML message
TBD
2.1 Sequences
TBD
2.1.1 Single-Valued Attributes
TBD
2.1.2 Multi-Valued Attributes
TBD
2.1.3 Single-Valued Relations
TBD
2.1.4 Multi-Valued Relations
TBD
2.2 Choices
TBD
2.2.1 Single-Valued Attributes
TBD
2.2.2 Multi-Valued Attributes
TBD
2.2.3 Single-Valued Relations
TBD
2.2.4 Multi-Valued Relations
TBD