Collection of X-definitions.
X-definition
<xd:collection xmlns:xd="http://www.xdef.org/xdef/4.2" > <xd:def name="Example" xd:root="Family" > <Family> <Father xd:script="occurs ?; ref common#Person;" /> <Mother xd:script="occurs 1; ref common#Person;" /> <xd:mixed> <Son xd:script="occurs 0..12; ref common#Person;" /> <Daughter xd:script="occurs 0..12; ref common#Person;" /> </xd:mixed> <Address xd:script="occurs 1; ref common#Address" /> </Family> </xd:def> <!-- Models of referred elements --> <xd:def xd:name="common" > <Person Firstname ="required string(1,30);" Familyname="required string(1,30);" BirthDate ="required date();" /> <Address Street="required string(1,30);" Number="optional int();" City="required string();" /> </xd:def> </xd:collection>
Input data
<Family> <Father Firstname = "John" Familyname = "Smith" BirthDate = "1971-07-13" /> <Mother Firstname = "Jane" Familyname = "Smith" BirthDate = "1972-09-18" /> <Son Firstname = "Peter" Familyname = "Smith" BirthDate = "1997-01-18" /> <Daughter Firstname = "Mary" Familyname = "Smith" BirthDate = "1998-12-11" /> <Address Street="Downing" Number="10" City="London"/> </Family>
You can edit both
X-definition
and/or
Input data