Hi, I'm mapping a HL7 schema to a home made schema. Now my schema looks like this:
<xs:element name="Patienten">
<xs:complexType>
<xs:sequence>
<xs:element name="Patient">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="ContactNummer" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Voornaam" type="xs:string" />
<xs:element minOccurs="0" name="Naam" type="xs:string" />
<xs:element minOccurs="0" name="Plaats" type="xs:string" />
<xs:element minOccurs="0" name="Straat" type="xs:string" />
<xs:element minOccurs="0" name="Campus" type="xs:string" />
<xs:element minOccurs="0" name="Kamer" type="xs:string" />
<xs:element minOccurs="0" name="Bed" type="xs:string" />
<xs:element minOccurs="0" name="Ontslagen" type="xs:string" />
<xs:element minOccurs="0" name="CampusCode" type="xs:string" />
<xs:element minOccurs="0" name="TelefoonCode" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
When I map elements from my HL7 schema and when I use a test file I get an error: "The element Patienten in namespace blabla is incomplete. List of possible elements: Patient".
I noticed that my testfile does not fill in the "straat" and "plaats" element. If i remove the mapping links of these two elements the map works fine. But I obviously need them. If I set the Patient element propertie minOccurs="0" then the validation is successfull, but I get an empty xml:
<ns0:Patienten xmlns:ns0="http://nextel.zna.be/ZNA_Nextel_Patient.xsd" />
If I remove the "Patient" element and just use the other elements as subelements of "Patienten" then the map works fine! But I need the subroot "Patient". I have been toying arround with min and max Occurs because I notice that these make a difference, but I'm still not getting to my solution. If I use a test example it works fine, so I don't get why it's not working...
Anyone has any ideas or similar problems?