The example of X-definition with groups.
X-definition
<xd:def xmlns:xd="http://www.xdef.org/xdef/4.2" root="Family | Owner"> <Family> <Father xd:script="optional; ref Person;" /> <Mother xd:script="required; ref Person;" /> <Son xd:script="occurs *; ref Person;" /> <Daughter xd:script="occurs *; ref Person;" /> </Family> <Owner> <xd:choice> <Person xd:script="ref Person;" > <Address xd:script="ref Address;" /> </Person> <Company xd:script="ref Company;" /> </xd:choice> </Owner> <Person Firstname="string();" Familyname="string();" BirthDate="date();" /> <Company name="string();" > <Address xd:script="ref Address;" /> </Company> <Address Street = "string(1,30)" Number = "optional int()" City = "string()" /> </xd:def>
Input data
<Owner> <Company name="Syntea software group a.s."> <Address Street="Radlická" Number="125" City="Praha" /> </Company> </Owner>
You can edit both
X-definition
and/or
Input data