Error validating schema: Unique Particle validation

Hello

We got a schema from a customer. we want to convert this schema to a TSD and store afterwards data in Tamino which is maximally checked by tamino.

I converted this schema via INOCONVERT and then tried to validate this TSD but I get several error. They are related to the fact that xs:choice is where the same name is used in several choice options. By replacing the choice
I was able to make a TSD which I can define in Tamino but doing so I was weakening the schema.

Could one have a look at the original schema and maybe come with a TSD which valid for Tamino but which remains conform to the original Schema ?
DRS.xsd (53.9 KB)

There are already problems with ambiguity in the original schema.

See output of IBM Schema Quality Checker 2.1.1 below.

I suggest to correct those first and then use inoconvert and try to define the output schema afterwards.

I took a quick look at the schema and in general these ambiguity problems can be solved by moving the sequence within the choice one level up, deleting the original choice and make those former choice elements in the sequence, who did not appear within the choice, optional (minOccurs = 0).

Tricky, I agree, so here is one example:

xs:choice
<xs:element ref = “DBRIndicatorInEntrepriseCadreMap”></xs:element>
xs:sequence
<xs:element ref = “DBRIndicatorInEntrepriseCadreMap”></xs:element>
<xs:element ref = “LegalBasis”></xs:element>
</xs:sequence>
</xs:choice>

becomes

xs:sequence
<xs:element ref = “DBRIndicatorInEntrepriseCadreMap”></xs:element>
<xs:element ref = “LegalBasis” minOccurs=“0”></xs:element>
</xs:sequence>
Best regards,
Peter

14:24
Initializing Schema Quality Checker. Please wait …
SchemaQualityChecker has been initialized
DRS.xml (file 1 of 1) now being read …
ERROR
file = file:C:/temp/forum/DRS.xml line 1437 column 19
SEVERITY: 1
ERROR TYPE: 2
MESSAGE
Ambiguous content model : the following particles overlap :
<xs:element block=“” maxOccurs=“28” minOccurs=“28” ref=“IndicationDaysAndHours”/>
,
<xs:element block=“” maxOccurs=“28” minOccurs=“28” ref=“IndicationDaysAndHours”/>

.

------------------------------------------------------------------------
ERROR
file = file:C:/temp/forum/DRS.xml line 1451 column 19
SEVERITY: 1
ERROR TYPE: 2
MESSAGE
Ambiguous content model : the following particles overlap :
<xs:element block=“” maxOccurs=“1” minOccurs=“1” ref=“MonthlyTheoreticalSalaryAmount”/>
,
<xs:element block=“” maxOccurs=“1” minOccurs=“1” ref=“MonthlyTheoreticalSalaryAmount”/>

.

------------------------------------------------------------------------
ERROR
file = file:C:/temp/forum/DRS.xml line 1460 column 19
SEVERITY: 1
ERROR TYPE: 2
MESSAGE
Ambiguous content model : the following particles overlap :
<xs:element block=“” maxOccurs=“1” minOccurs=“1” ref=“WorkPlaceIndicator”/>
,
<xs:element block=“” maxOccurs=“1” minOccurs=“1” ref=“WorkPlaceIndicator”/>

.

------------------------------------------------------------------------
ERROR
file = file:C:/temp/forum/DRS.xml line 391 column 42
SEVERITY: 1
ERROR TYPE: 2
MESSAGE
“1883-01-01” which was specified for minInclusive value, is not of the type : simpleType http://www.w3.org/2001/XMLSchema:date.

------------------------------------------------------------------------
ERROR
file = file:C:/temp/forum/DRS.xml line 871 column 42
SEVERITY: 1
ERROR TYPE: 2
MESSAGE
“2003-01-01” which was specified for minInclusive value, is not of the type : simpleType http://www.w3.org/2001/XMLSchema:date.

------------------------------------------------------------------------
14:25