I need to produce a kind of agenda for a group of persons with :
- 8 columns : 1 with the names of persons + 7 for the days of a week.
- 1 line for each person.
In each cell (for one person and one day) :
- Nothing if the person has no vacation
- as many lines as the number of vacations with "time from", "time to" and "service name" for each vacation.
Is it possible to get this with this XML schema i?
<?xml version="1.0"?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="ArrayOfPlanning" nillable="true" type="ArrayOfPlanning" />
<xs:complexType name="ArrayOfPlanning">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Planning" nillable="true" type="Planning" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Planning">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="Days" type="ArrayOfDay" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="ArrayOfDay">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Day" nillable="true" type="Day" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Day">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="Date" type="xs:dateTime" />
<xs:element minOccurs="0" maxOccurs="1" name="Vacations" type="ArrayOfVacation" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="ArrayOfVacation">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Vacation" nillable="true" type="Vacation" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Vacation">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="TimeFrom" type="xs:dateTime" />
<xs:element minOccurs="1" maxOccurs="1" name="TimeTo" type="xs:dateTime" />
<xs:element minOccurs="0" maxOccurs="1" name="Service" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>
Last edited 05 March 2018